/sanic-boilerplate

An example of Sanic application boilerplate using blueprints

Primary LanguagePython

sanic-boilerplate

An example of Sanic application boilerplate using blueprints

Project structure

├─ sanic-boilerplate/     # All application code located in this directory.
│  ├─ app/                 # Application code
│  │  ├─ sample_module/
|  |  |  ├─ __init__.py     # Here we define sample_module bluerprint
|  |  |  ├─ views.py          # Controller for sample_module
|  |  ├─ templates/      # All project templates located here
|  |  |  ├─ sample_module
|  |  |  |  ├─ sample_page.html
|  |  |  ├─ base.html   # Base extendable jinja2 template
|  |  |  ├─ index.html
|  |  ├─ __init__.py          # Application initialization here (registering blueprints, loading config, etc)
├─ Dockerfile
├─ .gitignore
├─ README.md
├─ config.py                 # Class-based configurations
├─ docker-compose.yml
├─ requirements.txt
├─ run.py                       # Create and run app