- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 20 for from (0.13 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) -
.github/actions/people/app/main.py
import logging import subprocess import sys from collections import Counter, defaultdict from datetime import datetime, timedelta, timezone from pathlib import Path from typing import Any, Container, DefaultDict, Dict, List, Set, Union import httpx import yaml from github import Github from pydantic import BaseModel, SecretStr from pydantic_settings import BaseSettings github_graphql_url = "https://api.github.com/graphql"
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Mar 26 17:38:21 GMT 2024 - 19.2K bytes - Viewed (1) -
.github/actions/notify-translations/app/main.py
import logging import random import sys import time from pathlib import Path from typing import Any, Dict, List, Union, cast import httpx from github import Github from pydantic import BaseModel, BaseSettings, SecretStr awaiting_label = "awaiting-review" lang_all_label = "lang-all" approved_label = "approved-2" translations_path = Path(__file__).parent / "translations.yml" github_graphql_url = "https://api.github.com/graphql"
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Wed Sep 27 23:01:46 GMT 2023 - 12.4K bytes - Viewed (0) -
docs_src/settings/app03/main.py
from functools import lru_cache from fastapi import Depends, FastAPI from . import config app = FastAPI() @lru_cache def get_settings(): return config.Settings() @app.get("/info") async def info(settings: 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 - 412 bytes - Viewed (0) -
docs_src/settings/app01/main.py
from fastapi import FastAPI from .config import settings app = FastAPI() @app.get("/info") async def info(): 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: Thu Jul 29 09:26:07 GMT 2021 - 267 bytes - Viewed (0) -
docs_src/bigger_applications/app_an/main.py
from fastapi import Depends, FastAPI 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: Sat Mar 18 12:29:59 GMT 2023 - 552 bytes - Viewed (0) -
docs_src/settings/app02/main.py
from functools import lru_cache 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: 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 - 406 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)