This project was created as a part of my final exam as a IT specialist for systems integration (2019).
The goal was to provide an interface for a digital logbook system based on an RESTful-API. The api is entirely written with Python using the Flask framework and SQLAlchemy as the ORM.
Note: This project has no frontend web interface - it only provides the backend system.
- RESTful-API easy access
- User authentication and authorization
- User and car management
- Ability to group cars into pools
- Store bills and driving routes
Installed version of Python, Flask and SQLAlchemy. A suitable database e.g. MySQL with a dedicated database and user access.
The database can be configured using the attached db-setup script. This script adds every required table and configures relational mappings. An overview of the database can be found here.
Configure the database connection settings inside /config.py:
# Database settings
# MySQL-URI: mysql://username:password@host/database
SQLALCHEMY_DATABASE_URI = 'mysql://<username>:<password>@<host>/<database>'
To run the application simply call this inside the application root:
$ flask run
The API should be up running now - you can test if everything works by using an http client and call:
$ curl -u <username>:<password> -X GET <host-address>/<endpoint>
To use the REST-API simply call the endpoints which can be found above. All endoints are secured by using Basic Auth. Make sure that every request to the API contains the authentication header.