pystro is a simple and easy to use and to extend api for restaurant managements apps.
pystro has basic restaurant business functionalities, expressed visually on following use case diagram:
pystro is written in Flask, tries to follow principles SOLID, KISS and DRY and Flask specific best practices, taking, for example, miguelgrinberg as one of the main references. We also follow pep8 style guide.
pystro uses SQLAlchemy as ORM framework. The models of pystro are those on the following class diagram:
pystro also uses Flask-Restful extension for better api design and creates a Flask Blueprint for each restaurant unit added on database, and registers the proper resources for them.
pystro runs with python3 (and possibly with python2). There are a docker container configuration. You can run pystro with or without docker.
Simply run docker-compose.
docker-compose up --build
-
First, you need to install mysql 5-6+ and create the pystro database and user.
Enter mysql shell (
mysql -uroot -p
) and type the following commands:create database pystro;
create user pystro@localhost;
grant all privileges on pystro.* to pystro@localhost identified by 'devpassword';
-
Create and activate the python virtualenv.
virtualenv -p python3 venv
source venv/bin/activate.sh
-
export FLASK_APP
export FLASK_APP=pystro.py
-
run it
flask run
pystro will be always open source, licensed under GPL3.
Feel free to contribute!