fastapi/docs/src/dependencies
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
..
tutorial001.py 📝 Improve explanation of dependencies 2019-01-01 19:27:02 +04:00
tutorial002.py ⬆️ Add tests, fix issues and update Pydantic 2018-12-28 16:10:29 +04:00
tutorial003.py ⬆️ Add tests, fix issues and update Pydantic 2018-12-28 16:10:29 +04:00
tutorial004.py ⬆️ Add tests, fix issues and update Pydantic 2018-12-28 16:10:29 +04:00
tutorial005.py 📝 Update and add docs for dependencies 2018-12-23 21:21:37 +04:00
tutorial006.py Add parameter dependencies to path operation decorators and include_router (#235) 2019-05-16 18:07:00 +04:00
tutorial007.py Add dependencies with yield (used as context managers) (#595) 2019-10-09 13:01:58 -05:00
tutorial008.py Add dependencies with yield (used as context managers) (#595) 2019-10-09 13:01:58 -05:00
tutorial009.py Add dependencies with yield (used as context managers) (#595) 2019-10-09 13:01:58 -05:00
tutorial010.py Add dependencies with yield (used as context managers) (#595) 2019-10-09 13:01:58 -05:00
tutorial011.py Add dependencies with yield (used as context managers) (#595) 2019-10-09 13:01:58 -05:00