- Sort Score
- Num 10 results
- Language All
Results 461 - 470 of 1,501 for apps (0.01 seconds)
-
docs/zh/docs/deployment/manually.md
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Oct 11 17:48:49 GMT 2025 - 6.7K bytes - Click Count (0) -
fastapi/security/http.py
```python from typing import Annotated from fastapi import Depends, FastAPI from fastapi.security import HTTPBasic, HTTPBasicCredentials app = FastAPI() security = HTTPBasic() @app.get("/users/me") def read_current_user(credentials: Annotated[HTTPBasicCredentials, Depends(security)]): return {"username": credentials.username, "password": credentials.password}Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 13.2K bytes - Click Count (0) -
docs_src/dependency_testing/tutorial001_an_py310.py
from fastapi.testclient import TestClient app = FastAPI() async def common_parameters(q: str | None = None, skip: int = 0, limit: int = 100): return {"q": q, "skip": skip, "limit": limit} @app.get("/items/") async def read_items(commons: Annotated[dict, Depends(common_parameters)]): return {"message": "Hello Items!", "params": commons} @app.get("/users/")
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 1.5K bytes - Click Count (0) -
tests/test_security_api_key_cookie_description.py
from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() api_key = APIKeyCookie(name="key", description="An API Cookie Key") class User(BaseModel): username: str def get_current_user(oauth_header: str = Security(api_key)): user = User(username=oauth_header) return user @app.get("/users/me") def read_current_user(current_user: User = Depends(get_current_user)):
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) -
docs/ja/docs/tutorial/debugging.md
ただし、次のように、別のファイルからインポートされるときには呼び出されません: ```Python from myapp import app ``` #### より詳しい説明 ファイルの名前が `myapp.py` だとします。 以下の様に実行する場合: <div class="termy"> ```console $ python myapp.py ``` </div> Pythonによって自動的に作成されたファイル内の内部変数 `__name__` は、値として文字列 `"__main__"` を持ちます。 なので、以下: ```Python uvicorn.run(app, host="0.0.0.0", port=8000) ``` は実行されます。 ---
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Mon Nov 18 02:25:44 GMT 2024 - 3K bytes - Click Count (0) -
tests/test_tutorial/test_cors/test_tutorial001.py
from fastapi.testclient import TestClient from docs_src.cors.tutorial001_py39 import app def test_cors(): client = TestClient(app) # Test pre-flight response headers = { "Origin": "https://localhost.tiangolo.com", "Access-Control-Request-Method": "GET", "Access-Control-Request-Headers": "X-Example", } response = client.options("/", headers=headers)
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 1.3K bytes - Click Count (0) -
tests/test_tutorial/test_custom_docs_ui/test_tutorial002.py
@pytest.fixture(scope="module") def client(): static_dir: Path = Path(os.getcwd()) / "static" print(static_dir) static_dir.mkdir(exist_ok=True) from docs_src.custom_docs_ui.tutorial002_py39 import app with TestClient(app) as client: yield client static_dir.rmdir() def test_swagger_ui_html(client: TestClient): response = client.get("/docs") assert response.status_code == 200, response.text
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 1.2K bytes - Click Count (0) -
tests/test_tutorial/test_custom_request_and_route/test_tutorial001.py
def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.custom_request_and_route.{request.param}") @mod.app.get("/check-class") async def check_gzip_request(request: Request): return {"request_class": type(request).__name__} client = TestClient(mod.app) return client @pytest.mark.parametrize("compress", [True, False]) def test_gzip_request(client: TestClient, compress):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 1.3K bytes - Click Count (0) -
docs/pt/docs/benchmarks.md
* **Uvicorn**: um servidor ASGI * **Starlette**: (utiliza Uvicorn) um _microframework web_ * **FastAPI**: (utiliza Starlette) um _microframework_ de API com vários recursos adicionais para construção de APIs, com validação de dados, etc. * **Uvicorn**: * Terá a melhor performance, já que ele não tem muito código extra além do servidor em si.Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Nov 12 16:23:57 GMT 2025 - 3.9K bytes - Click Count (0) -
tests/test_openapi_query_parameter_extension.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 18:19:10 GMT 2025 - 4.2K bytes - Click Count (0)