Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 59 for _get_settings (0.12 sec)

  1. subprojects/diagnostics/src/main/resources/org/gradle/api/tasks/diagnostics/htmldependencyreport/jquery.jstree.js

    			this.data = { core : {} };
    			this.get_settings	= function () { return $.extend(true, {}, settings); };
    			this._get_settings	= function () { return settings; };
    			this.get_index		= function () { return index; };
    			this.get_container	= function () { return container; };
    			this.get_container_ul = function () { return container.children("ul:eq(0)"); };
    			this._set_settings	= function (s) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Nov 04 09:03:42 UTC 2021
    - 49.5K bytes
    - Viewed (0)
  2. 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,
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Oct 24 20:26:06 UTC 2023
    - 406 bytes
    - Viewed (0)
  3. docs_src/settings/app02_an_py39/main.py

    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,
            "items_per_user": settings.items_per_user,
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Oct 24 20:26:06 UTC 2023
    - 445 bytes
    - Viewed (0)
  4. docs_src/settings/app02/test_main.py

    from fastapi.testclient import TestClient
    
    from .config import Settings
    from .main import app, get_settings
    
    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",
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Jul 29 09:26:07 UTC 2021
    - 515 bytes
    - Viewed (0)
  5. docs_src/settings/app03_an_py39/main.py

    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,
            "items_per_user": settings.items_per_user,
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Oct 24 20:26:06 UTC 2023
    - 462 bytes
    - Viewed (0)
  6. docs_src/settings/app02_an/test_main.py

    from fastapi.testclient import TestClient
    
    from .config import Settings
    from .main import app, get_settings
    
    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",
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 515 bytes
    - Viewed (0)
  7. docs_src/settings/app02_an_py39/test_main.py

    from fastapi.testclient import TestClient
    
    from .config import Settings
    from .main import app, get_settings
    
    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",
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 515 bytes
    - Viewed (0)
  8. 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,
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Oct 24 20:26:06 UTC 2023
    - 412 bytes
    - Viewed (0)
  9. docs_src/settings/app02_an/main.py

    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,
            "items_per_user": settings.items_per_user,
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Oct 24 20:26:06 UTC 2023
    - 456 bytes
    - Viewed (0)
  10. docs_src/settings/app03_an/main.py

    from typing import Annotated
    
    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: Annotated[config.Settings, Depends(get_settings)]):
        return {
            "app_name": settings.app_name,
            "admin_email": settings.admin_email,
            "items_per_user": settings.items_per_user,
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Oct 24 20:26:06 UTC 2023
    - 451 bytes
    - Viewed (0)
Back to top