The Airport API service, built on Django REST, is specifically crafted to monitor flights originating from airports globally. Providing comprehensive details on airports, planes, flights, routes, and beyond, this API functions as a powerful tool for effectively managing and analyzing data associated with air travel.
Before you begin, ensure you have met the following requirements:
git clone https://github.com/Sparix/Airport-API
cd Airport_API
python -m venv venv
source venv/bin/activate(on macOS)
venvScriptsactivate(on Windows)
pip install -r requirements.txt
set SECRET_KEY=< secret_key >
set POSTGRES_HOST=< db_host_name >
set POSTGRES_DB=< db_name >
set POSTGRES_USER=< db_username >
set POSTGRES_PASSWORD=< password_db >
python maange.py makemigrations
python manage.py migrate
python manage.py loaddata data_base.json
python manage.py runserver
The API should now be accessible at http://localhost:8000/
Docker should bу installed
docker-compose build
docker-compose up
create user api/user/register/
get access token api/user/token/
To authenticate, include the obtained token in your request headers with the format:
- Authorization: Bearer <your-token>
Information Restriction: Communication between administrators and regular users is limited, ensuring users access only entitled information.
Airport Details: Retrieve comprehensive data on global airports, including names, airport codes, and proximity to major cities and countries.
Route Insights: Access details about different routes, encompassing departure and destination airport names along with the distance between them.
Airplane Details: Retrieve information about airplane, such as their names, types, passenger row counts, and seat numbers per row. The system includes a built-in function for downloading and storing airplane images.
Flight Overview: Obtain detailed flight information, including route specifics, departure and arrival times, aircraft details, and seat availability. Filter the flight list by departure and arrival dates for added convenience.
Order Status: Authenticated users can review their order information.
Ticket Details: Facilitates the addition of flight tickets, allowing users to specify row and seat numbers for the order.
Authentication Mechanism: Users can create profiles by providing an email address and password. The API employs JWT (JSON Web Tokens) authentication to safeguard sensitive flight data.