- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for Lyding (0.16 sec)
-
docs_src/settings/app03_an_py39/main.py
from functools import lru_cache from fastapi import Depends, FastAPI from typing_extensions import Annotated from . import config app = FastAPI() @lru_cache 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,
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Oct 24 20:26:06 GMT 2023 - 462 bytes - Viewed (0) -
docs_src/app_testing/app_b/main.py
from typing import Union from fastapi import FastAPI, Header, HTTPException from pydantic import BaseModel fake_secret_token = "coneofsilence" fake_db = { "foo": {"id": "foo", "title": "Foo", "description": "There goes my hero"}, "bar": {"id": "bar", "title": "Bar", "description": "The bartenders"}, } app = FastAPI() class Item(BaseModel): id: str title: str description: Union[str, None] = None
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Jan 09 14:44:08 GMT 2024 - 1.1K bytes - Viewed (0) -
docs_src/settings/app02_an_py39/main.py
from functools import lru_cache from typing import Annotated from fastapi import Depends, FastAPI from .config import Settings app = FastAPI() @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,
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Oct 24 20:26:06 GMT 2023 - 445 bytes - Viewed (0) -
docs_src/sql_databases_peewee/sql_app/main.py
import time from typing import List from fastapi import Depends, FastAPI, HTTPException from . import crud, database, models, schemas from .database import db_state_default database.db.connect() database.db.create_tables([models.User, models.Item]) database.db.close() app = FastAPI() sleep_time = 10 async def reset_db_state(): database.db._state._state.set(db_state_default.copy()) database.db._state.reset()
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 2.2K bytes - Viewed (0) -
docs_src/settings/app02_an/main.py
from functools import lru_cache from fastapi import Depends, FastAPI from typing_extensions import Annotated from .config import Settings app = FastAPI() @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,
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Oct 24 20:26:06 GMT 2023 - 456 bytes - Viewed (0) -
docs_src/app_testing/app_b_an_py39/main.py
from typing import Annotated, Union from fastapi import FastAPI, Header, HTTPException from pydantic import BaseModel fake_secret_token = "coneofsilence" fake_db = { "foo": {"id": "foo", "title": "Foo", "description": "There goes my hero"}, "bar": {"id": "bar", "title": "Bar", "description": "The bartenders"}, } app = FastAPI() class Item(BaseModel): id: str title: str
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 1.1K bytes - Viewed (0) -
docs_src/app_testing/app_b_an_py310/main.py
from typing import Annotated from fastapi import FastAPI, Header, HTTPException from pydantic import BaseModel fake_secret_token = "coneofsilence" fake_db = { "foo": {"id": "foo", "title": "Foo", "description": "There goes my hero"}, "bar": {"id": "bar", "title": "Bar", "description": "The bartenders"}, } app = FastAPI() class Item(BaseModel): id: str title: str description: str | None = None
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 1.1K bytes - Viewed (0) -
.github/actions/comment-docs-preview-in-pr/app/main.py
import logging import sys from pathlib import Path from typing import Union import httpx from github import Github from github.PullRequest import PullRequest from pydantic import BaseModel, SecretStr, ValidationError from pydantic_settings import BaseSettings github_api = "https://api.github.com" class Settings(BaseSettings): github_repository: str github_event_path: Path github_event_name: Union[str, None] = None
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Jan 09 15:02:53 GMT 2024 - 2.1K bytes - Viewed (0) -
docs_src/sql_databases/sql_app/main.py
from typing import List from fastapi import Depends, FastAPI, HTTPException from sqlalchemy.orm import Session from . import crud, models, schemas from .database import SessionLocal, engine models.Base.metadata.create_all(bind=engine) app = FastAPI() # Dependency def get_db(): db = SessionLocal() try: yield db finally: db.close()
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sun May 17 10:14:14 GMT 2020 - 1.6K bytes - Viewed (0) -
docs_src/app_testing/app_b_an/main.py
from typing import Union from fastapi import FastAPI, Header, HTTPException from pydantic import BaseModel from typing_extensions import Annotated fake_secret_token = "coneofsilence" fake_db = { "foo": {"id": "foo", "title": "Foo", "description": "There goes my hero"}, "bar": {"id": "bar", "title": "Bar", "description": "The bartenders"}, } app = FastAPI() class Item(BaseModel): id: str title: str
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 1.2K bytes - Viewed (0)