Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 17 for ADMIN_EMAIL (0.05 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. docs_src/settings/tutorial001_pv1_py39.py

    
    class Settings(BaseSettings):
        app_name: str = "Awesome API"
        admin_email: str
        items_per_user: int = 50
    
    
    settings = 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,
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 20 15:55:38 GMT 2025
    - 413 bytes
    - Click Count (0)
  2. docs_src/settings/app02_py39/test_main.py

    client = TestClient(app)
    
    
    def get_settings_override():
        return Settings(admin_email="******@****.***")
    
    
    app.dependency_overrides[get_settings] = get_settings_override
    
    
    def test_app():
        response = client.get("/info")
        data = response.json()
        assert data == {
            "app_name": "Awesome API",
            "admin_email": "******@****.***",
            "items_per_user": 50,
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 515 bytes
    - Click Count (0)
  3. tests/test_tutorial/test_settings/test_app03.py

        monkeypatch.setenv("ADMIN_EMAIL", "******@****.***")
        settings = main_mod.get_settings()
        assert settings.app_name == "Awesome API"
        assert settings.admin_email == "******@****.***"
        assert settings.items_per_user == 50
    
    
    def test_endpoint(main_mod: ModuleType, monkeypatch: MonkeyPatch):
        monkeypatch.setenv("ADMIN_EMAIL", "******@****.***")
        client = TestClient(main_mod.app)
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 27 12:54:56 GMT 2025
    - 1.2K bytes
    - Click Count (0)
  4. docs_src/settings/tutorial001_py39.py

    
    class Settings(BaseSettings):
        app_name: str = "Awesome API"
        admin_email: str
        items_per_user: int = 50
    
    
    settings = 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,
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 419 bytes
    - Click Count (0)
  5. tests/test_tutorial/test_settings/test_app01.py

        if mod_name in sys.modules:
            del sys.modules[mod_name]
        monkeypatch.setenv("ADMIN_EMAIL", "******@****.***")
        main_mod = importlib.import_module(mod_name)
        return TestClient(main_mod.app)
    
    
    def test_settings_validation_error(mod_name: str, monkeypatch: MonkeyPatch):
        monkeypatch.delenv("ADMIN_EMAIL", raising=False)
        if mod_name in sys.modules:
            del sys.modules[mod_name]  # pragma: no cover
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Fri Dec 26 10:43:02 GMT 2025
    - 2.2K bytes
    - Click Count (0)
  6. docs_src/settings/app01_py39/config.py

    from pydantic_settings import BaseSettings
    
    
    class Settings(BaseSettings):
        app_name: str = "Awesome API"
        admin_email: str
        items_per_user: int = 50
    
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 183 bytes
    - Click Count (0)
  7. docs_src/settings/app03_an_py39/config_pv1.py

    from pydantic.v1 import BaseSettings
    
    
    class Settings(BaseSettings):
        app_name: str = "Awesome API"
        admin_email: str
        items_per_user: int = 50
    
        class Config:
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 20 15:55:38 GMT 2025
    - 198 bytes
    - Click Count (0)
  8. docs_src/settings/app01_py39/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,
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 267 bytes
    - Click Count (0)
  9. docs_src/settings/app03_py39/main.py

    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,
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 412 bytes
    - Click Count (0)
  10. docs_src/settings/app03_an_py39/main.py

        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,
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 10 08:55:32 GMT 2025
    - 451 bytes
    - Click Count (0)
Back to Top