Integration With Starlette-based Frameworks
===========================================
This is a `Starlette `_ +
`Dependency Injector `_ example application
utilizing `lifespan API `_.
.. note::
Pretty much `any framework built on top of Starlette `_
supports this feature (`FastAPI `_,
`Xpresso `_, etc...).
Run
---
Create virtual environment:
.. code-block:: bash
python -m venv env
. env/bin/activate
Install requirements:
.. code-block:: bash
pip install -r requirements.txt
To run the application do:
.. code-block:: bash
python example.py
# or (logging won't be configured):
uvicorn --factory example:container.app
After that visit http://127.0.0.1:8000/ in your browser or use CLI command (``curl``, ``httpie``,
etc).