This module requires:
- an installed and configured postgresql server.
- a python 3.8 installation.
docker-compose build web
pip3 install .
Apply sql/install.sql to desired user (this will create Restaurants table).
Copy /etc/peopledoc-test/resto.example.ini to /etc/peopledoc-test/resto.ini
Set postgresql connection informations. You're set !
docker-compose up web
TODO: workaround.
docker-compose run web pytest
$ resto-server --help
usage: resto-server [-h] [-c CONFIGURATION]
resto server
optional arguments:
-h, --help show this help message and exit
-c CONFIGURATION, --configuration CONFIGURATION
Configuration file path (default: /etc/peopledoc-test/resto.ini).
resto-server
resto-server -c test-resto.ini
pytest
- aiohttp-graphql: https://github.com/graphql-python/aiohttp-graphql
- aiopg vs asyncpg ? (asyncpg would be much faster but doesn't implement dbapi)
- tavern testing (yaml tests) : https://taverntesting.github.io/
- Improve documentation.
- Improve logs.
- Implement a reload function for the configuration file.
- Install init.d script (through debian package ?).
- Implement profiling.
- Use sqlalchemy ?
- Use a gateway for authentication / rate-limiting etc (Kong ?).
- Handle web handler cancellation using asyncio.shield (https://docs.aiohttp.org/en/stable/web_advanced.html#web-handler-cancellation).
- Test python 3.6 compatibility for pypy, then pypy and check performance gains.