This project serves as a comprehensive example of the various components employed in a modern web application. It showcases the integration of a backend framework, a CSS library for presentation, a database for data storage, and a templating library for rendering views. The implementation adheres to the Model-View-Controller (MVC) architecture.
The following shows the list of components used in the codebase.
Sanic is a Python micro web framework designed for speed and efficiency.
Peewee is a Python Object-Relational Mapping (ORM) library, providing a simple and expressive way to interact with databases.
Jinja2 is a powerful templating engine for Python, used for dynamically generating HTML and other markup.
Bootstrap is a popular CSS framework that facilitates the development of responsive and visually appealing user interfaces.
SQLite is a self-contained, serverless, and zero-configuration database engine. It is widely used for its simplicity and ease of integration.
This project employs pipenv to manage the virtual environment and dependencies for the development environment. pipenv ensures a consistent and reproducible environment for contributors. Before setting up the development environment, make sure you have the following tools installed:
- Python (= 3.8)
- pipenv
pipenv --python 3.8
pipenv install --dev
pipenv shell
sanic app:app --debug
Make sure the app is running in a single process mode by sending --single-process
flag
sanic --debug --single-process app:app
The --reload
flag needs to run multiple processes, one for watching the file changes and one for the actual application, so this flag should not be supplied when debugging using breakpoints.
sanic app:app