This project has been archived by its maintainers, and is no longer receiving any updates.
Indego Bike Share Python Library
About
I have tried to make a re-usable Python library for the Philadelphia Indego Bike Share API! I'm not very familiar with Python, but tried to learn by creating this.
I wrote this similarly to my existing Indego PHP library.
Check out the City of Philadelphia GitHub if you think this library is interesting!
Installation
Installation of this library should be as simple as running:
pip install indego
Compatibility
Please note that this library is only compatible with Python 3+. Python 2 is not supported.
Example
When combined with the provided Indego class, the following code will generate the example output:
from indego import Indego
# Instantiate the Indego class
indego = Indego()
# Retrieve and print "university" stations
uni_stations = indego.get_stations('university')
print(uni_stations)
# Show how many stations were returned above
uni_count = len(uni_stations)
print(uni_count, 'stations returned')
Output:
$ python3 university_example.py
{3008: {'addressStreet': '1076 Berks Street', 'addressCity': 'Philadelphia', 'addressState': 'PA', 'addressZipCode': '19122', 'bikesAvailable': 3, 'closeTime': '03:55:00', 'docksAvailable': 16, 'eventEnd': None, 'eventStart': None, 'isEventBased': False, 'isVirtual': False, 'isVisible': False, 'kioskId': 3008, 'kioskPublicStatus': 'Active', 'kioskStatus': 'FullService', 'name': 'Temple University Station', 'notes': None, 'openTime': '04:00:00', 'publicText': '', 'timeZone': 'Eastern Standard Time', 'totalDocks': 19, 'trikesAvailable': 0, 'kioskConnectionStatus': 'Active', 'kioskType': 1, 'latitude': 39.98078, 'longitude': -75.15055, 'hasGeofence': False, 'classicBikesAvailable': 3, 'smartBikesAvailable': 0, 'electricBikesAvailable': 0, 'isArchived': False}, 3020: {'addressStreet': '3051 South St.', 'addressCity': 'Philadelphia', 'addressState': 'PA', 'addressZipCode': '19147', 'bikesAvailable': 11, 'closeTime': '03:55:00', 'docksAvailable': 24, 'eventEnd': None, 'eventStart': None, 'isEventBased': False, 'isVirtual': False, 'isVisible': False, 'kioskId': 3020, 'kioskPublicStatus': 'Active', 'kioskStatus': 'FullService', 'name': 'University City Station', 'notes': None, 'openTime': '04:00:00', 'publicText': '', 'timeZone': 'Eastern Standard Time', 'totalDocks': 35, 'trikesAvailable': 0, 'kioskConnectionStatus': 'Active', 'kioskType': 1, 'latitude': 39.94922, 'longitude': -75.19036, 'hasGeofence': False, 'classicBikesAvailable': 11, 'smartBikesAvailable': 0, 'electricBikesAvailable': 0, 'isArchived': False}}
2 stations returned
Providing an argument/filter to get_stations() to limit the selection of stations only limits the results within the Indego class. The API end-point itself always returns all stations.
Unfortunately, there does not appear to be a signifcant amount of documentation for the API being used nor does there seem to be any parameters available to limit the stations being retrieved from the API.
Calling get_stations() without any arguments will return a list of all (currently, 132) stations.
More Information
Metadata
Release files for indego 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| indego-1.1.0.tar.gz | 3.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| indego-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.8 kB
Release files / indego-1.1.0.tar.gz
| Download URL | indego-1.1.0.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
05b6e25452bfdf6f65862b812efd12b32e9ce78e530b12efe46d1c27a0a41bfd
|
|
BLAKE2b-256 checksum How to use checksums |
f036399829907819b2eff5fde7cbcb94df87e269df564fca573099b5e2232ddf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.7
|
Release files / indego-1.1.0-py3-none-any.whl
| Download URL | indego-1.1.0-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a55c444a48f23695a1bf92e9a210c9c802db548abb14d41635c2f9988a3fe925
|
|
BLAKE2b-256 checksum How to use checksums |
e11834ea28cab3f55b3cae7b13b9fbad771bc79dc27824d18fb79e86b0930248
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.7
|