- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 53 for Maduin (0.17 sec)
-
docs_src/bigger_applications/app_an_py39/internal/admin.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 147 bytes - Viewed (0) -
docs_src/bigger_applications/app_an/internal/admin.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 147 bytes - Viewed (0) -
tests/test_tutorial/test_settings/test_tutorial001_pv1.py
@needs_pydanticv1 def test_settings(monkeypatch: MonkeyPatch): monkeypatch.setenv("ADMIN_EMAIL", "admin@example.com") from docs_src.settings.tutorial001_pv1 import app client = TestClient(app) response = client.get("/info") assert response.status_code == 200, response.text assert response.json() == { "app_name": "Awesome API", "admin_email": "admin@example.com", "items_per_user": 50,
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 556 bytes - Viewed (0) -
docs_src/settings/app03_an/main.py
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,
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Oct 24 20:26:06 GMT 2023 - 451 bytes - Viewed (0) -
tests/test_jsonable_encoder.py
class Unserializable: def __iter__(self): raise NotImplementedError() @property def __dict__(self): raise NotImplementedError() class RoleEnum(Enum): admin = "admin" normal = "normal" class ModelWithConfig(BaseModel): role: Optional[RoleEnum] = None if PYDANTIC_V2: model_config = {"use_enum_values": True} else: class Config:
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 21:56:59 GMT 2024 - 9K bytes - Viewed (0) -
docs_src/settings/app02/config.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 159 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" 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 Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 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 Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 13.9K bytes - Viewed (0) -
docs_src/bigger_applications/app/internal/admin.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sun Nov 29 17:32:18 GMT 2020 - 147 bytes - Viewed (0) -
docs_src/settings/app02_an_py39/test_main.py
client = TestClient(app) def get_settings_override(): return Settings(admin_email="testing_admin@example.com") 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": "testing_admin@example.com", "items_per_user": 50,
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 515 bytes - Viewed (0)