Skip to content

Commit 3a61457

Browse files
authored
Asyncio daemon tutorial (ets-labs#278)
* Fix a typo in the docblock of the Configuration provider * Update the changelog * Add tutorial sections * Switch to use https for httpbin.org requests * Add what we are going to build section * Fix ``Makefile`` to run ``aiohttp`` integration tests on Python 3.5+ * Add prerequisities and prepare the env sections * Add logging, config and the dispacher sections * Change logging * Fix multiple typos in the ``flask`` and ``aiohttp`` tutorials * Add the initial and dirty version * Fix multiple typos in the ``flask`` and ``aiohttp`` tutorials * Fix the 3.27.0 changelog * Finish all the parts before the dispatcher * Finish dispatcher section * Update http monitor logging format * Finish the tutorial * Fix docblock in the dispatcher module * Update changelog * Add meta keywords and description
1 parent 2ff36b4 commit 3a61457

File tree

19 files changed

+3029
-1910
lines changed

19 files changed

+3029
-1910
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ test-py2: build
5555
test-py3: build
5656
# Unit tests with coverage report
5757
coverage erase
58-
coverage run --rcfile=./.coveragerc -m unittest2 discover -s tests/unit/ -p test_*py3.py
58+
coverage run --rcfile=./.coveragerc -m unittest2 discover -s tests/unit/ -p test_*py3*.py
5959
coverage report --rcfile=./.coveragerc
6060
coverage html --rcfile=./.coveragerc
6161

docs/index.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ Dependency Injector --- Dependency injection framework for Python
77
:keywords: Python,Dependency injection,DI,Inversion of Control,IoC,
88
IoC Container,Factory, Singleton, Design Patterns
99
:description: Dependency Injector is a dependency injection framework
10-
for Python. It was designed to be unified, developer-friendly
10+
for Python. It helps to maintain you application structure.
11+
It was designed to be unified, developer-friendly
1112
tool that helps to implement dependency injection design
1213
pattern in formal, pretty, Pythonic way. Dependency Injector
1314
provides implementations of such popular design patterns

docs/introduction/di_in_python.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,10 @@ What's next?
131131

132132
Choose one of the following as a next step:
133133

134-
+ Pass the dependency injection :ref:`flask-tutorial`.
135-
+ Look at the other dependency injection :ref:`tutorials`.
134+
+ Pass one of the dependency injection tutorials:
135+
+ :ref:`flask-tutorial`
136+
+ :ref:`aiohttp-tutorial`
137+
+ :ref:`asyncio-daemon-tutorial`
136138
+ Know more about the :ref:`providers`.
137139
+ Go to the :ref:`contents`.
138140

docs/main/changelog.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,18 @@ that were made in every particular version.
77
From version 0.7.6 *Dependency Injector* framework strictly
88
follows `Semantic versioning`_
99

10+
Development version
11+
-------------------
12+
- Add ``asyncio`` + ``Dependency Injector`` example ``monitoring-daemon-asyncio``.
13+
- Add ``asyncio`` + ``Dependency Injector`` monitoring daemon tutorial.
14+
- Fix a typo in the docblock of the ``Configuration`` provider.
15+
- Fix multiple typos in the ``flask`` and ``aiohttp`` tutorials.
16+
- Fix ``Makefile`` to run ``aiohttp`` integration tests on Python 3.5+.
17+
1018
3.27.0
1119
------
1220
- Add deep init injections overriding for ``Factory`` provider.
21+
- Add ``asyncio`` monitoring daemon example.
1322

1423
3.26.0
1524
------

docs/tutorials/aiohttp.rst

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
1+
.. _aiohttp-tutorial:
2+
13
Aiohttp tutorial
24
================
35

4-
.. _aiohttp-tutorial:
6+
.. meta::
7+
:keywords: Python,Aiohttp,Tutorial,Education,Web,API,REST API,Example,DI,Dependency injection,
8+
IoC,Inversion of control,Refactoring,Tests,Unit tests,Pytest,py.test,Bootstrap,
9+
HTML,CSS
10+
:description: This tutorial shows how to build an aiohttp application following the dependency
11+
injection principle. You will create the REST API application, connect to the
12+
Giphy API, cover it with the unit test and make some refactoring.
513

6-
This tutorials shows how to build an ``aiohttp`` REST API application following the dependency
14+
This tutorial shows how to build an ``aiohttp`` REST API application following the dependency
715
injection principle.
816

917
Start from the scratch or jump to the section:
@@ -908,9 +916,9 @@ You should see:
908916
Conclusion
909917
----------
910918

911-
In this tutorial we've build an ``aiohttp`` REST API application following the dependency
919+
In this tutorial we've built an ``aiohttp`` REST API application following the dependency
912920
injection principle.
913-
We've used ``Dependency Injector`` as a dependency injection framework.
921+
We've used the ``Dependency Injector`` as a dependency injection framework.
914922

915923
The benefit you get with the ``Dependency Injector`` is the container. It starts to payoff
916924
when you need to understand or change your application structure. It's easy with the container,

0 commit comments

Comments
 (0)