Splitinerary is a collaborative itinerary library in Python.
Coordinating a group to go on a trip together is difficult because some people may fly to the same destination from different origins, some people may split off mid-trip to go somewhere else and rejoin, and some people might be staying in different places (with relatives, for example). This python program will be the core functionality for an app that allows users to work together to create a collaborative itinerary.
- Trips are objects that have one or more users associated with it.
- Each trip will have events inside of it like flights, hotels, trains, AirBnBs, concerts, etc. that each user can associate him or herself with.
- Each even has more granular information like flight number for flights, address for hotels and airbnbs, station for trains, etc.
- Each event can also have a dollar amount so costs are kept track of.
The end result is a comprehensive itinerary where every person in the trip can see who is doing what at any given point in time.
It uses a Makefile as a command registry, with the following commands:
make
: list available commandsmake develop
: install and build this library and its dependencies usingpip
make build
: build the library usingsetuptools
make lint
: perform static analysis of this library withflake8
andblack
make format
: autoformat this library usingblack
make test
: run automated tests withunittest
make coverage
: run automated tests withunittest
and collect coverage information
Shell command to install the library from PyPI:
pip install splitinerary
After installing the library, import the splitinerary module:
import splitinerary
Or import specific objects to use:
from splitinerary import Trip, Plane
Example program for a simple trip:
from splitinerary import Trip, Plane
import datetime
now = datetime.datetime.now()
date = now.date()
trip = Trip()
event = Event(now)
trip.add_event(event)
events = trip.get_all_events()
For a full list of objects and functions, please see documentation.
https://el3030.github.io/splitinerary/
The source code is currently hosted on GitHub at: https://github.com/el3030/splitinerary