cookiecutter-aiohttp-sqlalchemy

: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

example_web_app

An Example Web API project powered by Aiohttp and SQLAlchemy

Contents

Synopsis

bin/service {start|stop|status|restart}

Dependencies

Critical Backends

System Requirements

Features

API

How To Guides

Setup

Setup on Host

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.

Build

Build on Host

$ make clean install

Build on Docker

$ make docker-build

Run

Dev Server

Development server is strictly for development purposes only. It comes with neat support for file-watching and automatic hot-reload.

$ make dev-server

Standalone

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

Docker Container

$ 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

Test

$ make test

Package

$ make package

The result of the command is a wheel binary under the dist/ local directory.

Additional Resources