- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 34 for Jasmin (0.18 sec)
-
docs_src/bigger_applications/app/main.py
from .dependencies import get_query_token, get_token_header from .internal import admin from .routers import items, users app = FastAPI(dependencies=[Depends(get_query_token)]) app.include_router(users.router) app.include_router(items.router) app.include_router( admin.router, prefix="/admin", tags=["admin"], dependencies=[Depends(get_token_header)],
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sun Nov 29 17:32:18 GMT 2020 - 552 bytes - Viewed (0) -
docs_src/settings/app03_an_py39/main.py
def get_settings(): return config.Settings() @app.get("/info") async def info(settings: Annotated[config.Settings, Depends(get_settings)]): return { "app_name": settings.app_name, "admin_email": settings.admin_email, "items_per_user": settings.items_per_user,
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Oct 24 20:26:06 GMT 2023 - 462 bytes - Viewed (0) -
tests/test_tutorial/test_bigger_applications/test_main_an.py
def test_admin(client: TestClient): response = client.post( "/admin/?token=jessica", headers={"X-Token": "fake-super-secret-token"} ) assert response.status_code == 200, response.text assert response.json() == {"message": "Admin getting schwifty"} def test_admin_invalid_header(client: TestClient): response = client.post("/admin/", headers={"X-Token": "invalid"})
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 24.6K bytes - Viewed (0) -
tests/test_tutorial/test_bigger_applications/test_main_an_py39.py
}, }, }, }, "/admin/": { "post": { "tags": ["admin"], "summary": "Update Admin", "operationId": "update_admin_admin__post", "parameters": [ { "required": True,
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 24.9K bytes - Viewed (0) -
tests/test_tutorial/test_settings/test_tutorial001.py
@needs_pydanticv2 def test_settings(monkeypatch: MonkeyPatch): monkeypatch.setenv("ADMIN_EMAIL", "admin@example.com") from docs_src.settings.tutorial001 import app client = TestClient(app) response = client.get("/info") assert response.status_code == 200, response.text assert response.json() == { "app_name": "Awesome API", "admin_email": "admin@example.com", "items_per_user": 50,
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 552 bytes - Viewed (0) -
docs_src/settings/tutorial001.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 419 bytes - Viewed (0) -
docs_src/settings/app02_an_py39/main.py
@lru_cache def get_settings(): return Settings() @app.get("/info") async def info(settings: Annotated[Settings, Depends(get_settings)]): return { "app_name": settings.app_name, "admin_email": settings.admin_email, "items_per_user": settings.items_per_user,
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Oct 24 20:26:06 GMT 2023 - 445 bytes - Viewed (0) -
tests/test_tutorial/test_settings/test_app02.py
from pytest import MonkeyPatch from ...utils import needs_pydanticv2 @needs_pydanticv2 def test_settings(monkeypatch: MonkeyPatch): from docs_src.settings.app02 import main monkeypatch.setenv("ADMIN_EMAIL", "admin@example.com") settings = main.get_settings() assert settings.app_name == "Awesome API" assert settings.items_per_user == 50 @needs_pydanticv2 def test_override_settings():
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 488 bytes - Viewed (0) -
docs_src/settings/app02_an_py39/config.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 159 bytes - Viewed (0) -
docs_src/bigger_applications/app_an/internal/admin.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 147 bytes - Viewed (0)