When it comes to trip planning, we tend to go search for a travel blog to find out what are the places to visit, things to do etc. by the time we look at 2-3 pages we already have a list of things in our head. Things we care about are:
- Where to stay?
- How should we set the plan?
- We do not want to commute much, Can we visit some places in one go?
This creeps in a lot of confusion and more often than not we tend to procrastinate on our planning and travel. You're imagining a lot of back and forth with google maps, Isn't it?
Itinative is a python package built on top of google API's which intend to automate trip planning with the least amount of information and create a recommendation of an itinerary with several considerations:
- Maximize the prominence covered in the available time (must visit important places)
- Consolidate nearby places together
- Won't go to a place when it's not open
- Allocate some time at each place of visit
- Recommend hotels at the city hotspot
- Don't start too early don't finish too late
- ... and a few more ...
Name your city and No. of days and let itinative be your travel planner!
While we get this to pypi, use the following:
pip install git+https://github.com/geraparth/itinative.git@v1.13
-
Import packge and initialize it with an API key
import itinative agent = itinative.initialize(api_key="YOUR-API-KEY")
Read the instructions here to obtain your personal API key
-
Give two things to start the planner:
Enter the location:Which city you want to visit?How many days are you planning for?:1,2,3.. whatever
-
And finally, call generate function that does the job.
agent.generate()
- Check this jupyter-notebook
- Video
All the configurations can be done on the agent before calling the generate() method.
-
Itinative retrieves opening times and closing time for the places from Google but it doesn't know when you start/want to start your trip and call it a day. Itinative assumes local time 8 AM for opening and 7 PM for closing.
However, you can configure it (if needed) using the utility methods:
agent = itinative.initialize() agent.configure_opening_time(<new-opening-time>) agent.configure_closing_time(<new-closing-time>)
Note: The package follows an easy military time format. If not familiar, get available examples using:
print(agent.time_format) -
Change waiting time, due to places API restrictions itinative in the current version cannot retrieve the "time usually spent" values from google. So we've assumed that the user plans to stay for about 90 minutes at a place. This can be configured as shown below:
agent = itinative.initialize() agent.waiting_time = <new-waiting-time-in-minutes>
