Skip to main content

Python3 library for working with the Philadelphia Indego Bike Share API

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

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 in the next section:

from indego import Indego

# Instantiate the Indego class
indego = Indego()

# Just get "university" stations
uni_stations = indego.get_stations('university')

print(uni_stations)

Providing a argument/filter to get_stations() to return a list of stations only limits the results within the Indego class.

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:

$ python3 example.py
{3008: {'addressStreet': '1076 Berks Street', 'addressCity': 'Philadelphia', 'addressState': 'PA', 'addressZipCode': '19122', 'bikesAvailable': 5, 'closeTime': '03:55:00', 'docksAvailable': 14, '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': 5, 'smartBikesAvailable': 0, 'electricBikesAvailable': 0, 'isArchived': False}, 3020: {'addressStreet': '3051 South St.', 'addressCity': 'Philadelphia', 'addressState': 'PA', 'addressZipCode': '19147', 'bikesAvailable': 6, 'closeTime': '03:55:00', 'docksAvailable': 29, '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': 6, 'smartBikesAvailable': 0, 'electricBikesAvailable': 0, 'isArchived': False}}

More Information

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

indego-1.0.4.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

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

indego-1.0.4-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file indego-1.0.4.tar.gz.

File metadata

  • Download URL: indego-1.0.4.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using 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.31.1 CPython/3.6.7

File hashes

Hashes for indego-1.0.4.tar.gz
Algorithm Hash digest
SHA256 09819a87bb48d98e29a8cc03497037b159b31d1720d50bd83d6787a7de8d52fa
MD5 3f48f230cb82c90b36c96c992c90bfe5
BLAKE2b-256 13d62c745eee4877feaebebd5a9d3c1c12fda444afd2c5da417a730f18d0ffa8

See more details on using hashes here.

File details

Details for the file indego-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: indego-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using 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.31.1 CPython/3.6.7

File hashes

Hashes for indego-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e61f1816da5c6a239d73e69498cb8341b87bf73320797e1ac8b656596f7932c2
MD5 cc3c599cc733b745ba9f55598f7a0a60
BLAKE2b-256 248ef732c36f10411709bae58fbc14e709a609cca5b49463c49a4c426e2f14e8

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