A book store management system
Bookstore is an API for managing a book store inventory.
Backend
- Language: Python
- Database: PostgreSQL
- ORM: SQLAlchemy
- REST API: Flask
- Make sure you have the following installed on your machine:
- Git: Windows, Mac. (Linux users should install using their system's package manager)
- Python 3.8.10
- Postgres Database 13 and above.
- make sure you have pip and virtualenv installed.
Intiallizing postgres database
CREATE USER bookstore WITH PASSWORD 'bookstore';
CREATE DATABASE bookstore;
GRANT ALL PRIVILEGES ON DATABASE bookstore TO bookstore;
Clone the repo:
git clone
Change directory
cd bookstore-inventory-management-system
Note: make sure you have pip
and virtualenv
installed.
Initial installation: make install
To run test: make tests
` To run application: make run
To run all commands at once : make all
Make sure to run the initial migration commands to update the database.
> python3 manage.py db init
> python3 manage.py db migrate --message 'initial database migration'
> python3 manage.py db upgrade
Create virtualenv:
python3 -m venv venv
Activate the virtual environment
source venv/bin/activate
Install the requirements
pip3 install -r requirements.txt
Run the application
python3 manage.py run
Run the application: PRODUCTION Mode
gunicorn manage:app --worker-class gevent --bind 0.0.0.0:5000 --log-level info
Run the command in alterative to and before you run the application run below command
python -m pytest -v