- Sort Score
- Num 10 results
- Language All
Results 1001 - 1010 of 1,501 for apps (0.02 seconds)
-
tests/test_security_api_key_query_optional.py
from pydantic import BaseModel app = FastAPI() api_key = APIKeyQuery(name="key", auto_error=False) class User(BaseModel): username: str def get_current_user(oauth_header: Optional[str] = Security(api_key)): if oauth_header is None: return None user = User(username=oauth_header) return user @app.get("/users/me")
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 2K bytes - Click Count (0) -
tests/test_security_http_digest.py
from fastapi.testclient import TestClient app = FastAPI() security = HTTPDigest() @app.get("/users/me") def read_current_user(credentials: HTTPAuthorizationCredentials = Security(security)): return {"scheme": credentials.scheme, "credentials": credentials.credentials} client = TestClient(app) def test_security_http_digest():
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Mon Nov 24 19:03:06 GMT 2025 - 2.1K bytes - Click Count (0) -
tests/test_put_no_body.py
from fastapi import FastAPI from fastapi.testclient import TestClient app = FastAPI() @app.put("/items/{item_id}") def save_item_no_body(item_id: str): return {"item_id": item_id} client = TestClient(app) def test_put_no_body(): response = client.put("/items/foo") assert response.status_code == 200, response.text assert response.json() == {"item_id": "foo"} def test_put_no_body_with_body():
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 3.3K bytes - Click Count (0) -
docs/ru/docs/tutorial/middleware.md
/// ## Порядок выполнения нескольких middleware { #multiple-middleware-execution-order } Когда вы добавляете несколько middleware с помощью декоратора `@app.middleware()` или метода `app.add_middleware()`, каждое новое middleware оборачивает приложение, формируя стек. Последнее добавленное middleware — самое внешнее (*outermost*), а первое — самое внутреннее (*innermost*).Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 6.3K bytes - Click Count (0) -
docs/uk/docs/tutorial/response-model.md
У таких випадках можна скористатися параметром `response_model` в декораторі маршруту (наприклад, @app.get()). Параметр `response_model` працює з будь-яким *оператором шляху*: * `@app.get()` * `@app.post()` * `@app.put()` * `@app.delete()` * тощо. {* ../../docs_src/response_model/tutorial001_py310.py hl[17,22,24:27] *} /// note | Примітка
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Jun 24 19:14:01 GMT 2025 - 24.8K bytes - Click Count (0) -
cmd/bucket-lifecycle-handlers_test.go
package cmd import ( "bytes" "encoding/xml" "net/http" "net/http/httptest" "testing" "github.com/minio/minio/internal/auth" ) // Test S3 Bucket lifecycle APIs with wrong credentials func TestBucketLifecycleWrongCredentials(t *testing.T) {
Created: Sun Dec 28 19:28:13 GMT 2025 - Last Modified: Mon Jun 10 15:50:49 GMT 2024 - 11.3K bytes - Click Count (0) -
docs/fr/docs/tutorial/debugging.md
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sun Oct 27 17:31:14 GMT 2024 - 2.9K bytes - Click Count (0) -
docs/pt/docs/tutorial/debugging.md
Então, a seção: ```Python uvicorn.run(app, host="0.0.0.0", port=8000) ``` vai executar. --- Isso não acontecerá se você importar esse módulo (arquivo). Então, se você tiver outro arquivo `importer.py` com: ```Python from myapp import app # Mais um pouco de código ```Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 2.7K bytes - Click Count (0) -
docs_src/security/tutorial004_an_py39.py
) return Token(access_token=access_token, token_type="bearer") @app.get("/users/me/", response_model=User) async def read_users_me( current_user: Annotated[User, Depends(get_current_active_user)], ): return current_user @app.get("/users/me/items/") async def read_own_items( current_user: Annotated[User, Depends(get_current_active_user)], ):Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Mon Sep 29 02:57:38 GMT 2025 - 4.2K bytes - Click Count (0) -
scripts/playwright/separate_openapi_schemas/image05.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Sep 13 09:14:46 GMT 2024 - 984 bytes - Click Count (0)