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
Release history Release notifications | RSS feed
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.2.tar.gz
(1.9 kB
view details)
File details
Details for the file Holiday-Manager-0.2.tar.gz.
File metadata
- Download URL: Holiday-Manager-0.2.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78de700fec3e66d853f7bc05bb35de96062d2d566a1120bb666397a019e75e9c
|
|
| MD5 |
6ec33bf18573844294d2956b15d947d2
|
|
| BLAKE2b-256 |
82ad28448125cecfee3e764415ba22b7c8574e68d19d099210c7a06d1a2c080d
|