- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 38 for resources (0.58 sec)
-
tests/test_request_body_parameters_media_type.py
from fastapi import Body, FastAPI from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() media_type = "application/vnd.api+json" # NOTE: These are not valid JSON:API resources # but they are fine for testing requestBody with custom media_type class Product(BaseModel): name: str price: float class Shop(BaseModel): name: str @app.post("/products")
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 6.4K bytes - Viewed (0) -
docs/en/docs/deployment/manually.md
```Python from main import app ``` !!! warning Uvicorn and others support a `--reload` option that is useful during development. The `--reload` option consumes much more resources, is more unstable, etc. It helps a lot during **development**, but you **shouldn't** use it in **production**. ## Hypercorn with Trio
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu May 02 22:37:31 GMT 2024 - 9.2K bytes - Viewed (0) -
docs/en/docs/resources/index.md
# Resources
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Wed Oct 18 12:36:40 GMT 2023 - 77 bytes - Viewed (0) -
docs_src/events/tutorial003.py
@asynccontextmanager async def lifespan(app: FastAPI): # Load the ML model ml_models["answer_to_everything"] = fake_answer_to_everything_ml_model yield # Clean up the ML models and release the resources ml_models.clear() app = FastAPI(lifespan=lifespan) @app.get("/predict") async def predict(x: float): result = ml_models["answer_to_everything"](x)
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Mar 07 15:46:00 GMT 2023 - 569 bytes - Viewed (0) -
docs/en/mkdocs.yml
- reference/openapi/models.md - reference/security/index.md - reference/encoders.md - reference/staticfiles.md - reference/templating.md - reference/testclient.md - fastapi-people.md - Resources: - resources/index.md - project-generation.md - external-links.md - newsletter.md - About: - about/index.md - alternatives.md - history-design-future.md - benchmarks.md - Help:
Others - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu May 02 22:37:31 GMT 2024 - 9.1K bytes - Viewed (0) -
docs/fr/docs/project-generation.md
* Modèle de démarrages basiques pour les utilisateurs (à modifier et supprimer au besoin). * Migrations **Alembic**. * **CORS** (partage des ressources entre origines multiples, ou *Cross Origin Resource Sharing*). * *Worker* **Celery** pouvant importer et utiliser les modèles et le code du reste du backend.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jul 02 14:18:06 GMT 2021 - 6.7K bytes - Viewed (0) -
docs/de/docs/resources/index.md
# Ressourcen
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Jan 23 11:22:17 GMT 2024 - 79 bytes - Viewed (0) -
docs/en/docs/tutorial/middleware.md
But if you have custom headers that you want a client in a browser to be able to see, you need to add them to your CORS configurations ([CORS (Cross-Origin Resource Sharing)](cors.md){.internal-link target=_blank}) using the parameter `expose_headers` documented in <a href="https://www.starlette.io/middleware/#corsmiddleware" class="external-link" target="_blank">Starlette's CORS docs</a>.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Jan 11 16:31:18 GMT 2024 - 2.9K bytes - Viewed (0) -
docs/de/docs/tutorial/middleware.md
class="external-link" target="_blank">Verwenden Sie dafür das Präfix 'X-'</a>. Wenn Sie jedoch benutzerdefinierte Header haben, die ein Client in einem Browser sehen soll, müssen Sie sie zu Ihrer CORS-Konfigurationen ([CORS (Cross-Origin Resource Sharing)](cors.md){.internal-link target=_blank}) hinzufügen, indem Sie den Parameter `expose_headers` verwenden, der in der <a href="https://www.starlette.io/middleware/#corsmiddleware" class="external-link" target="_blank">Starlette-CORS-Dokumentation</a>...
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Jan 23 11:26:59 GMT 2024 - 3.4K bytes - Viewed (0) -
docs/zh/docs/tutorial/middleware.md
``` !!! tip 请记住可以 <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers" class="external-link" target="_blank">用'X-' 前缀</a>添加专有自定义请求头. 但是如果你想让浏览器中的客户端看到你的自定义请求头, 你需要把它们加到 CORS 配置 ([CORS (Cross-Origin Resource Sharing)](cors.md){.internal-link target=_blank}) 的 `expose_headers` 参数中,在 <a href="https://www.starlette.io/middleware/#corsmiddleware" class="external-link" target="_blank">Starlette's CORS docs</a>文档中. !!! note "技术细节"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 27 17:25:21 GMT 2021 - 2.7K bytes - Viewed (0)