This repository contains the API endpoints of Airtech Services. This enables users to be authenticated and authorized before booking a flight ticket, purchase tickets, make flight reservations amongst others. This project is built using Django rest framework.
The url to the API could be found here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
-
Install
pip
if it is not installed yet in your system -
To install virtual environment, run in your terminal:
pip install virtualenv
- To create a virtual environment, in the root folder of the cloned app, run:
virtualenv -p python3 venv
- To activate the virtualenv:
source venv/bin/activate
- Run the command below to install all the project dependencies:
pip install -r requirements.txt
- To deactivate the virtualenv:
deactivate
- Clone this repository
-
Cd into the cloned app, create a virtualenv and activate(see instruction above for steps to create a virtualenv)
-
Create a
.env
file, copy the variables in the.env_sample
in the root directory of the project and set up the configurations according to your system. -
Ensure to makemigrations then migrate by running the following commands sequencially:
- python manage.py makemigrations
- python manage.py migrate
- To start the application, in the root directory of the project, run:
python manage.py runserver
- Run the below command to start Celery worker and Celery beat:
celery -A flight_booking_api worker --loglevel=info
celery -A flight_booking_api beat --loglevel=info
- To start up the RabbitMQ server:
rabbitmq-server
- To run test:
python manage.py test
- Test coverage:
coverage run manage.py test
- Coverage report:
coverage report
- Registration
- Login
- Upload Passport Photo
- Admin Create Flight
- Book Tickets
- Purchase Tickets
- Receive Tickets as Email
- Make Flight Reservation
- Check Flight Status
- The API is documented with Postman. See the API Doc for details.
- Python 3
- Postgresql
- Django Rest Framework (API development)
- Celery (Asynchronous Task Queue)
- RabbitMQ (A message broker)
- Insomnia (API Test tool)
- Eloka Chima
- This project is licensed under the MIT License - see the LICENCE file for details