{"id":37395582,"url":"https://github.com/amadeus4dev-examples/amadeus-trip-purpose-django","last_synced_at":"2026-01-16T05:36:49.666Z","repository":{"id":46837146,"uuid":"249746568","full_name":"amadeus4dev-examples/amadeus-trip-purpose-django","owner":"amadeus4dev-examples","description":"Python/Django application demonstrating the Trip-Purpose Prediction API","archived":false,"fork":false,"pushed_at":"2024-04-22T09:55:26.000Z","size":16,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-22T11:01:36.957Z","etag":null,"topics":["amadeus","amadeus-api","demo","django","example","prototype","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amadeus4dev-examples.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-24T15:34:23.000Z","updated_at":"2023-08-26T17:16:37.000Z","dependencies_parsed_at":"2022-09-16T23:01:18.461Z","dependency_job_id":null,"html_url":"https://github.com/amadeus4dev-examples/amadeus-trip-purpose-django","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/amadeus4dev-examples/amadeus-trip-purpose-django","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amadeus4dev-examples%2Famadeus-trip-purpose-django","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amadeus4dev-examples%2Famadeus-trip-purpose-django/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amadeus4dev-examples%2Famadeus-trip-purpose-django/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amadeus4dev-examples%2Famadeus-trip-purpose-django/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amadeus4dev-examples","download_url":"https://codeload.github.com/amadeus4dev-examples/amadeus-trip-purpose-django/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amadeus4dev-examples%2Famadeus-trip-purpose-django/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28477366,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T03:13:13.607Z","status":"ssl_error","status_checked_at":"2026-01-16T03:11:47.863Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["amadeus","amadeus-api","demo","django","example","prototype","python"],"created_at":"2026-01-16T05:36:49.601Z","updated_at":"2026-01-16T05:36:49.659Z","avatar_url":"https://github.com/amadeus4dev-examples.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"This project demonstrates how to integrate Amadeus APIs using the [Python SDK](https://github.com/amadeus4dev/amadeus-python) in a Django application.\n\nIn this scenario, the end user submits round-trip information via a form and the [Trip Purpose Prediction API](https://developers.amadeus.com/self-service/category/trip/api-doc/trip-purpose-prediction) is called. This API predicts if a the given journey is for leisure or business purposes.\n\nYou can refer to this [blog article](https://developers.amadeus.com/blog/amadues-api-django-python-sdk) which goes through the implementation step by step. \n\n## How to run the project locally\n\nClone the repository.\n\n```sh\ngit clone https://github.com/amadeus4dev/amadeus-trip-purpose-django.git\ncd amadeus-trip-purpose-django\n```\n\nNext create a virtual environment and install the dependencies.\n\n```sh\nvirtualenv venv\nsource venv/bin/activate\npip install -r requirements.txt\n```\n\nFor authentication add your API key/secret to your environmental variables.\n\n```sh\nexport AMADEUS_CLIENT_ID=YOUR_API_KEY\nexport AMADEUS_CLIENT_SECRET=YOUR_API_SECRET\n```\n\nYou can easily switch between `test` and `production` environments by setting:\n\n```\nexport AMADEUS_HOSTNAME=\"test\" # an empty value will also set the environment to test\n```\n\nor\n\n```\nexport AMADEUS_HOSTNAME=\"production\"\n```\n\n\u003e Each environment has different API keys. Do not forget to update them!\n\nFinally, run the Django server.\n\n```sh\npython prediction/manage.py runserver\n```\n\nFinally, open a browser and go to `https://127.0.0.1:8000`\n\n## License\n\nThis library is released under the [MIT License](LICENSE).\n\n## Help\n\nYou can find us on [StackOverflow](https://stackoverflow.com/questions/tagged/amadeus) or join our developer community on\n[Discord](https://discord.gg/cVrFBqx).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famadeus4dev-examples%2Famadeus-trip-purpose-django","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famadeus4dev-examples%2Famadeus-trip-purpose-django","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famadeus4dev-examples%2Famadeus-trip-purpose-django/lists"}