API service for airport management written on DRF and Dockerized
Install PostgresSQL and create db
git clone https://github.com/vburkalo/Airport-API-Service.git
cd airport_api_service
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
set DB_HOST=<your db hostname>
set DB_NAME=<your db name>
set DB_USER=<your db username>
set DB_PASSWORD=<your db user password>
set SECRET_KEY=<your secret key>
python manage.py makemigrations
python manage.py migrate
python manage.py runserver
Docker should be installed (you can download it here: https://www.docker.com/)
docker-compose build
docker-compose up
docker compose ps
docker exec -it your_image_name sh
python manage.py createsuperuser
To access the API endpoints, follow these steps:
-
Go to one of the following URLs:
-
Type in your Email & Password. For example:
- Email address: [email protected]
- Password: 12345
-
After submitting your credentials, you will receive a token. This token grants access to the API endpoints.
You can use the following endpoints:
- Refresh Token - This URL will refresh your token when it expires.
- Verify Token - This URL will verify if your token is valid and has not expired.
- User Details - This URL will display information about yourself using the token assigned to your user.
Please note that accessing certain endpoints may require the ModHeader extension, which is available for installation in Chrome.
That's it for user endpoints. You can now proceed to the next step.
-
First, go to the URL provided: API Endpoints. This URL provides all endpoints of the API.
-
Now you are ready to use the API to manage your airport. Have fun!
- JWT authenticated
- Admin panel available at
/admin/
- Documentation located at
/api/doc/swagger/
- Manage orders and tickets for the airport
- Create Countries, Cities, Airports, Airplane Types, Airplanes (with images), Routes, Crew, Flights, Orders, Tickets
- Implemented filtering for every endpoint in Swagger