Skip to content

Latest commit

 

History

History
executable file
·
106 lines (72 loc) · 2.88 KB

File metadata and controls

executable file
·
106 lines (72 loc) · 2.88 KB

Map with Hotels, Points of Interests and Tours & Activities

In this prototype we demonstrate POIs and tours for a chosen hotel on the map, using the following APIs:

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

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_AMADEUS_API_KEY
export AMADEUS_CLIENT_SECRET=YOUR_AMADEUS_API_SECRET
export HERE_API_KEY=YOUR_HERE_API_KEY

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-hotel-search-pois-tours-django.git
cd amadeus-hotel-search-pois-tours

Next create a virtual environment and install the dependencies.

python -m venv 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
export HERE_API_KEY=YOUR_HERE_API_KEY

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 amadeus_demo/manage.py runserver

Finally, open a browser and go to https://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.