- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 27 for admin_email (0.58 sec)
-
docs_src/settings/app02/main.py
@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/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/settings/app02/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,
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Jul 29 09:26:07 GMT 2021 - 515 bytes - Viewed (0) -
docs_src/settings/app02_an_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,
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 515 bytes - Viewed (0) -
docs_src/settings/app03/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,
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/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) -
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", "******@****.***") 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/en/docs/advanced/settings.md
{!../../../docs_src/settings/tutorial001.py!} ``` ### Run the server Next, you would run the server passing the configurations as environment variables, for example you could set an `ADMIN_EMAIL` and `APP_NAME` with: <div class="termy"> ```console $ ADMIN_EMAIL="******@****.***" APP_NAME="ChimichangApp" fastapi run main.py <span style="color: green;">INFO</span>: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit) ```
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu May 02 22:37:31 GMT 2024 - 15.7K bytes - Viewed (0) -
docs/zh/docs/advanced/settings.md
然后,您可以在应用程序中使用新的 `settings` 对象: ```Python hl_lines="18-20" {!../../../docs_src/settings/tutorial001.py!} ``` ### 运行服务器 接下来,您将运行服务器,并将配置作为环境变量传递。例如,您可以设置一个 `ADMIN_EMAIL` 和 `APP_NAME`,如下所示: <div class="termy"> ```console $ ADMIN_EMAIL="******@****.***" APP_NAME="ChimichangApp"uvicorn main:app <span style="color: green;">INFO</span>: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit) ```
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 13.9K bytes - Viewed (0) -
docs/em/docs/advanced/settings.md
```Python hl_lines="18-20" {!../../../docs_src/settings/tutorial001.py!} ``` ### 🏃 💽 ⏭, 👆 🔜 🏃 💽 🚶♀️ 📳 🌐 🔢, 🖼 👆 💪 ⚒ `ADMIN_EMAIL` & `APP_NAME` ⏮️: <div class="termy"> ```console $ ADMIN_EMAIL="******@****.***" APP_NAME="ChimichangApp" uvicorn main:app <span style="color: green;">INFO</span>: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit) ```
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 11.4K bytes - Viewed (0)