fastapi/docs/tutorial
Sebastián Ramírez 3f9f4a0f8f
Add dependencies with yield (used as context managers) (#595)
*  Add development/testing dependencies for Python 3.6

*  Add concurrency submodule with contextmanager_in_threadpool

*  Add AsyncExitStack to ASGI scope in FastAPI app call

*  Use async stack for contextmanager-able dependencies

including running in threadpool sync dependencies

*  Add tests for contextmanager dependencies

including internal raise checks when exceptions should be handled and when not

*  Add test for fake asynccontextmanager raiser

* 🐛 Fix mypy errors and coverage

* 🔇 Remove development logs and prints

*  Add tests for sub-contextmanagers, background tasks, and sync functions

* 🐛 Fix mypy errors for Python 3.7

* 💬 Fix error texts for clarity

* 📝 Add docs for dependencies with yield

*  Update SQL with SQLAlchemy tutorial to use dependencies with yield

and add an alternative with a middleware (from the old tutorial)

*  Update SQL tests to remove DB file during the same tests

*  Add tests for example with middleware

as a copy from the tests with dependencies with yield, removing the DB in the tests

* ✏️ Fix typos with suggestions from code review

Co-Authored-By: dmontagu <35119617+dmontagu@users.noreply.github.com>
2019-10-09 13:01:58 -05:00
..
dependencies Add dependencies with yield (used as context managers) (#595) 2019-10-09 13:01:58 -05:00
security 📝 Add notes about installing python-multipart for forms (#574) 2019-10-04 15:33:42 -05:00
additional-responses.md Add/refactor addditional responses, tests, docs 2019-04-05 13:54:00 +04:00
additional-status-codes.md Add docs about responses with additional status codes (#156) 2019-04-12 22:43:21 +04:00
application-configuration.md ⬆️ Update Pydantic to 0.21.0 (#90) 2019-03-21 18:40:29 +04:00
async-sql-databases.md Add docs and tests for encode/databases (#107) 2019-03-25 22:17:31 +04:00
background-tasks.md 📝 Add note about Celery in background tasks 2019-03-25 23:47:25 +04:00
bigger-applications.md 📝 Add note to docs about including same router multiple times (#348) 2019-06-28 19:54:49 +02:00
body-multiple-params.md ✏️ Fix typos and docs notes 2018-12-29 18:43:58 +04:00
body-nested-models.md Implement support for Pydantic's ORM mode (#322) 2019-06-20 11:31:32 +02:00
body-schema.md 📝 Add docs about params as functions for mypy (#231) 2019-05-15 22:01:23 +04:00
body-updates.md Add include, exclude, and by_alias to path operation methods (#264) 2019-05-27 16:08:13 +04:00
body.md ✏️ Fix typos and docs notes 2018-12-29 18:43:58 +04:00
cookie-params.md 📝 Add docs about params as functions for mypy (#231) 2019-05-15 22:01:23 +04:00
cors.md ✏️ Fix typos in docs, from forms (#176) 2019-04-27 17:05:06 +04:00
custom-request-and-route.md Add better support for request body access/manipulation with custom classes (#589) 2019-10-04 19:23:34 -05:00
custom-response.md 📝 Add docs about returning a response directly and encoder (#184) 2019-04-26 13:40:23 +04:00
debugging.md ✏️ Fix typos in docs, from forms (#176) 2019-04-27 17:05:06 +04:00
encoder.md 📝 Add docs about returning a response directly and encoder (#184) 2019-04-26 13:40:23 +04:00
events.md Add events docs and tests (#99) 2019-03-24 12:45:46 +04:00
extending-openapi.md Add docs/tests extending OpenAPI (#126) 2019-03-30 19:53:44 +04:00
extra-data-types.md Add docs, tests and fixes for extra data types 2018-12-22 14:35:48 +04:00
extra-models.md Implement support for Pydantic's ORM mode (#322) 2019-06-20 11:31:32 +02:00
first-steps.md 📝 Fix incorrect example in docs - first steps (#511) 2019-10-03 18:57:49 -05:00
graphql.md ✏️ Fix GraphQL typo 2019-02-20 22:02:19 +04:00
handling-errors.md Separate Pydantic's ValidationError handler and improve docs for error handling (#273) 2019-05-29 16:27:55 +04:00
header-params.md 📝 Add docs about params as functions for mypy (#231) 2019-05-15 22:01:23 +04:00
intro.md 📝 Update Uvicorn docs with new --reload option (#74) 2019-03-09 22:10:25 +04:00
middleware.md Docs and tests, responses with headers and cookies (#185) 2019-04-26 15:13:59 +04:00
nosql-databases.md 📝 Add Project Generation section 2018-12-21 20:27:03 +04:00
path-operation-advanced-configuration.md Allow docstrings to be truncated before being used for OpenAPI (#556) 2019-10-04 15:02:40 -05:00
path-operation-configuration.md Upgrade docstring Markdown parsing (#163) 2019-04-16 22:49:18 +04:00
path-params-numeric-validations.md 📝 Add docs about params as functions for mypy (#231) 2019-05-15 22:01:23 +04:00
path-params.md 📝 Update enum examples to use str, and improve Swagger UI in examples (#351) 2019-06-28 21:27:27 +02:00
query-params-str-validations.md 🐛 Fix path and query parameters receiving dict as valid (#287) 2019-06-03 21:59:40 +04:00
query-params.md Refactor param extraction using Pydantic Field (#278) 2019-05-30 17:40:43 +04:00
request-files.md 📝 Add notes about installing python-multipart for forms (#574) 2019-10-04 15:33:42 -05:00
request-forms-and-files.md 📝 Add notes about installing python-multipart for forms (#574) 2019-10-04 15:33:42 -05:00
request-forms.md 📝 Add notes about installing python-multipart for forms (#574) 2019-10-04 15:33:42 -05:00
response-change-status-code.md Add support for Response parameters to set headers, cookies, and status codes (#294) 2019-06-06 14:29:40 +04:00
response-cookies.md Add support for Response parameters to set headers, cookies, and status codes (#294) 2019-06-06 14:29:40 +04:00
response-directly.md 📝 Update response-directly.md, fix link (#306) 2019-06-13 18:34:20 +02:00
response-headers.md Add support for Response parameters to set headers, cookies, and status codes (#294) 2019-06-06 14:29:40 +04:00
response-model.md 📝 Fix default response model docs (#288) 2019-06-13 18:31:48 +02:00
response-status-code.md Add support for Response parameters to set headers, cookies, and status codes (#294) 2019-06-06 14:29:40 +04:00
sql-databases.md Add dependencies with yield (used as context managers) (#595) 2019-10-09 13:01:58 -05:00
static-files.md Add docs and tests for Jinja2 templates (#186) 2019-04-26 18:49:15 +04:00
sub-applications-proxy.md 📝 Update Uvicorn docs with new --reload option (#74) 2019-03-09 22:10:25 +04:00
templates.md Add docs and tests for Jinja2 templates (#186) 2019-04-26 18:49:15 +04:00
testing-dependencies.md Implement dependency overrides for testing (#291) 2019-06-05 15:43:18 +04:00
testing.md Update testing docs, examples for testing POST, headers (#271) 2019-05-29 11:47:21 +04:00
using-request-directly.md ✏️ Fix typos 2019-03-02 19:54:52 +04:00
websockets.md Add support for WebSockets with dependencies, params, etc #166 (#178) 2019-05-24 20:41:41 +04:00