Skip to main content

A package for planning holidays

Project description

Holiday Package

Introduction

This package is designed to help you plan your holidays. It includes functionalities for finding flights, hotels, and attractions.

Installation

pip install Holiday

Usage

Here are some example usages of the package.

Find Flights

from Holiday import Flight, setup

setup(<your amadeus client id>, <your amadeus client secret>, <your google place api key>)


get_flights = Flight('LHR', 'JFK')
budget = 1000
flight_offers = get_flights.find_flights()
for i in flight_offers:
    print("\n")
    print(f"Airline: {i['airline']}")
    print(f"Departure time: {i['departure_time']}")
    print(f"Arrival time: {i['arrival_time']}")
    if int(float(i['adult_ticket_price'])) < budget: 
        print(f"This offer fits your budget as one ticket costs {i['adult_ticket_price']}")
    else:
        print(f"This offer does not fit your budget as one ticket costs {i['adult_ticket_price']}")

Find Hotels

from Holiday import Hotel, setup

setup(<your amadeus client id>, <your amadeus client secret>, <your google place api key>)


hotel = Hotel('2023-11-31', '2023-12-05', 'LON', 1)
rooms = hotel.find_hotel_rooms()
print(rooms)

Find Attractions

from Holiday import Attractions, setup

setup(<your amadeus client id>, <your amadeus client secret>, <your google place api key>)

places = Attractions.Functions('Pensylvania, USA', 'ta')
output = places.get_attractions()


for i in output:
    print('\n')
    print(f"{i['name']} ({i['rating']}⋆)")
    print(f"Address: {i['address']}")
    print(f"Type: {i['type']}")

Find Food

from Holiday import Attractions, setup

setup(<your amadeus client id>, <your amadeus client secret>, <your google place api key>)

places = Attractions.Functions('London', 'food')
output = places.get_attractions()


for i in output:
    print('\n')
    print(f"{i['name']} ({i['rating']}⋆)")
    print(f"Address: {i['address']}")
    print(f"Type: {i['type']}")

Contribution

Feel free to contribute to this package. For any bugs, please open an issue.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Holiday-Manager-0.1.tar.gz (1.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Holiday_Manager-0.1-py3-none-any.whl (1.9 kB view details)

Uploaded Python 3

File details

Details for the file Holiday-Manager-0.1.tar.gz.

File metadata

  • Download URL: Holiday-Manager-0.1.tar.gz
  • Upload date:
  • Size: 1.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for Holiday-Manager-0.1.tar.gz
Algorithm Hash digest
SHA256 c706013d2dd4d1779b039781dcb4ffe0d7015c4a49107b2536e25885c13cc321
MD5 461def688c59b708c584a43529d1708d
BLAKE2b-256 07bf527dc3ca5b6e7d730d6e3a2eea9cadddb3c44735e8ed1fe1ea26afb71a0d

See more details on using hashes here.

File details

Details for the file Holiday_Manager-0.1-py3-none-any.whl.

File metadata

  • Download URL: Holiday_Manager-0.1-py3-none-any.whl
  • Upload date:
  • Size: 1.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for Holiday_Manager-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2520a65047c5e4b4d718b4c1251ee28a9192ef0704f6ada504564fc8664f509a
MD5 8fcd5be414192d9b8b0c3ec4b256bf53
BLAKE2b-256 9f0493b8d305deeb2f6c1162eddc59b212762ef319bb6671c8cde7bd36370c44

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page