fastapi/docs/src
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
..
additional_responses Add/refactor addditional responses, tests, docs 2019-04-05 13:54:00 +04:00
additional_status_codes Add docs about responses with additional status codes (#156) 2019-04-12 22:43:21 +04:00
app_testing Update testing docs, examples for testing POST, headers (#271) 2019-05-29 11:47:21 +04:00
application_configuration ⬆️ Update Pydantic to 0.21.0 (#90) 2019-03-21 18:40:29 +04:00
async_sql_databases Add docs and tests for encode/databases (#107) 2019-03-25 22:17:31 +04:00
background_tasks Add support for BackgroundTasks parameters (#103) 2019-03-24 23:33:35 +04:00
bigger_applications Add parameter dependencies to path operation decorators and include_router (#235) 2019-05-16 18:07:00 +04:00
body 📝 Move tutorial src files to top level docs 2018-12-21 16:22:33 +04:00
body_multiple_params 📝 Move tutorial src files to top level docs 2018-12-21 16:22:33 +04:00
body_nested_models Implement support for Pydantic's ORM mode (#322) 2019-06-20 11:31:32 +02:00
body_schema 📝 Move tutorial src files to top level docs 2018-12-21 16:22:33 +04:00
body_updates Add include, exclude, and by_alias to path operation methods (#264) 2019-05-27 16:08:13 +04:00
cookie_params 📝 Move tutorial src files to top level docs 2018-12-21 16:22:33 +04:00
cors Add docs about CORS (#169) 2019-04-20 21:13:01 +04:00
custom_request_and_route Add better support for request body access/manipulation with custom classes (#589) 2019-10-04 19:23:34 -05:00
custom_response ♻️ Rename parameter content_type to response_class (#183) 2019-04-26 13:11:16 +04:00
debugging 📝 Add docs for debugging 2019-03-02 17:40:01 +04:00
dependencies Add dependencies with yield (used as context managers) (#595) 2019-10-09 13:01:58 -05:00
dependency_testing Implement dependency overrides for testing (#291) 2019-06-05 15:43:18 +04:00
encoder 📝 Add docs about returning a response directly and encoder (#184) 2019-04-26 13:40:23 +04:00
events Add testing docs and tests (#151) 2019-04-12 20:15:05 +04:00
extending_openapi Add docs/tests extending OpenAPI (#126) 2019-03-30 19:53:44 +04:00
extra_data_types Add docs, tests and fixes for extra data types 2018-12-22 14:35:48 +04:00
extra_models Implement support for Pydantic's ORM mode (#322) 2019-06-20 11:31:32 +02:00
first_steps 📝 Move tutorial src files to top level docs 2018-12-21 16:22:33 +04:00
graphql Add docs for GraphQL (#48) 2019-02-20 21:58:26 +04:00
handling_errors Separate Pydantic's ValidationError handler and improve docs for error handling (#273) 2019-05-29 16:27:55 +04:00
header_params Multi-value query parameters and duplicate headers (#95) 2019-03-22 21:47:54 +04:00
middleware 📝 Add docs for middleware (#173) 2019-04-21 19:56:20 +04:00
nosql_databases 📝 Move tutorial src files to top level docs 2018-12-21 16:22:33 +04:00
path_operation_advanced_configuration Allow docstrings to be truncated before being used for OpenAPI (#556) 2019-10-04 15:02:40 -05:00
path_operation_configuration Upgrade docstring Markdown parsing (#163) 2019-04-16 22:49:18 +04:00
path_params 📝 Update enum examples to use str, and improve Swagger UI in examples (#351) 2019-06-28 21:27:27 +02:00
path_params_numeric_validations 📝 Move tutorial src files to top level docs 2018-12-21 16:22:33 +04:00
python_types 📝 Move tutorial src files to top level docs 2018-12-21 16:22:33 +04:00
query_params 📝 Change limit default parameter to 10 in Query docs (#366) 2019-07-12 18:22:21 -05:00
query_params_str_validations 🐛 Fix path and query parameters receiving dict as valid (#287) 2019-06-03 21:59:40 +04:00
request_files Add support for multi-file uploads (#158) 2019-04-14 22:12:14 +04:00
request_forms 📝 Move tutorial src files to top level docs 2018-12-21 16:22:33 +04:00
request_forms_and_files Add support for UploadFile class annotations (#63) 2019-03-03 20:52:37 +04:00
response_change_status_code Add support for Response parameters to set headers, cookies, and status codes (#294) 2019-06-06 14:29:40 +04:00
response_cookies Add support for Response parameters to set headers, cookies, and status codes (#294) 2019-06-06 14:29:40 +04:00
response_directly 📝 Add docs about returning a response directly and encoder (#184) 2019-04-26 13:40:23 +04:00
response_headers Add support for Response parameters to set headers, cookies, and status codes (#294) 2019-06-06 14:29:40 +04:00
response_model Add include, exclude, and by_alias to path operation methods (#264) 2019-05-27 16:08:13 +04:00
response_status_code 📝 Add docs for response status codes 2019-01-14 17:30:55 +04:00
security Use 401 with WWW-Authenticate for OAuth2 and add scope_str (#188) 2019-04-27 17:00:56 +04:00
sql_databases Add dependencies with yield (used as context managers) (#595) 2019-10-09 13:01:58 -05:00
static_files Add docs and tests for Jinja2 templates (#186) 2019-04-26 18:49:15 +04:00
sub_applications Add Open API prefix route - correct docs behind reverse proxy (#26) 2019-02-14 22:57:49 +04:00
templates Add docs and tests for Jinja2 templates (#186) 2019-04-26 18:49:15 +04:00
using_request_directly 📝 Add docs for using the Starlette Request directly (#25) 2019-02-16 12:44:56 +04:00
websockets Add support for WebSockets with dependencies, params, etc #166 (#178) 2019-05-24 20:41:41 +04:00