GithubHelp home page GithubHelp logo

f22j / amadeus-flight-price-analysis-django Goto Github PK

View Code? Open in Web Editor NEW

This project forked from amadeus4dev/amadeus-flight-price-analysis-django

0.0 0.0 0.0 169 KB

Returns if the cheapest available flight is a good deal

License: MIT License

Python 52.60% CSS 9.71% Makefile 2.41% HTML 34.67% Dockerfile 0.61%

amadeus-flight-price-analysis-django's Introduction

Flight Search and AI APIs showcase

What is this?

This prototype retrieves flight offers using the Flight Offers Search API for a given itinerary. Then it displays if the cheapest available flight is a good deal based on the Flight Price Analysis API. We finally predict if the trip is for business or leisure using the Trip Purpose Prediction API.

You can also directly view the demo of the prototype and refer to the blog article as well.

title

How to run the project via Docker (recommended)

Build the image from the Dockerfile. The following command will

make

The container receives your API key/secret from the environment variables. Before running the container, make sure your have your credentials correctly set:

export AMADEUS_CLIENT_ID=YOUR_API_KEY
export AMADEUS_CLIENT_SECRET=YOUR_API_SECRET
export DEBUG_VALUE="True"

Finally, start the container from the image:

make run

At this point you can open a browser and go to https://0.0.0.0:8000.

Note that it is also possible to run in detached mode so your terminal is still usable:

make start

Stop the container with:

make stop

How to run the project locally

Clone the repository.

git clone https://github.com/amadeus4dev/amadeus-flight-price-analysis-django.git
cd flight-price-analysis

Next create a virtual environment and install the dependencies.

virtualenv venv
source venv/bin/activate
pip install -r requirements.txt

For authentication add your API key/secret to your environmental variables.

export AMADEUS_CLIENT_ID=YOUR_API_KEY
export AMADEUS_CLIENT_SECRET=YOUR_API_SECRET

You can easily switch between test and production environments by setting:

export AMADEUS_HOSTNAME="test" # an empty value will also set the environment to test

or

export AMADEUS_HOSTNAME="production"

Each environment has different API keys. Do not forget to update them!

Finally, run the Django server.

python pricing/manage.py runserver

Finally, open a browser and go to http://127.0.0.1:8000/

License

This library is released under the MIT License.

Help

You can find us on StackOverflow or join our developer community on Discord.

amadeus-flight-price-analysis-django's People

Contributors

dependabot[bot] avatar tsolakoua avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.