:cookie: Fat and opinionated cookiecutter template for building async Web Apps powered by Aiohttp, SQLAlchemy and Swagger
View the Project on GitHub aalhour/cookiecutter-aiohttp-sqlalchemy
An Example Web API project powered by Aiohttp and SQLAlchemy
bin/service {start|stop|status|restart}
requirements.txt
file and the setup.py
script for a complete, up-to date, list of application requirementsrequirements_dev.txt
file specified dependencies necessary for running the tests. See testing instructions belowhttp://0.0.0.0:9999/api/v1.0/docs
example_web_app/docs/swagger-v1.0.yaml
Configure the app:
cp config/default.conf ~/.config/example_web_app.conf
Install the app:
$ make clean install
Make sure you have the database user/passwords in your ~/.pgpass
file.
$ make clean install
$ make docker-build
Development server is strictly for development purposes only. It comes with neat support for file-watching and automatic hot-reload.
$ make dev-server
To run the application as a standalone service in the background (SysV style), run the following command. All logs are redirected to the logs/example_web_app.log
file.
$ bin/service start
$ make docker-run
The above command assumes the docker image has been built, to make sure you have built it already, please run the following command:
$ make docker-build
$ make test
$ make package
The result of the command is a wheel binary under the dist/
local directory.