Skip to main content

Python API for Velib.

Project description

Veliberator

Veliberator provides a Python API for getting informations about the stations of the Velib’ bike renting network.

Binaries

The packages provides few binaries to tests and to initialize the datas.

  • synchronize.py

    Must be used at first to grab the general datas about the stations.

  • find_place.py

    A test script for finding free places to park a bike or the stations around.

Note that you must run these commands as root until you have not configured your own settings.

Usage

To retrieve the informations of a station you only have to have the ID of the station, and run synchronize.py to initiate the data.

The in your python interpreter :

>>> from veliberator.stations import Station
>>> station = Station(42008)
>>> station.informations.address
u'128 AVENUE DANIEL CASANOVA'

The informations attributes contains many data such as :

  • address

  • postal_code

  • city

  • lat (the latitude of GPS coordonates)

  • lng (the longitude of GPS coordonates)

  • opened (boolean who told if the station is open)

  • bonus (boolean who told if the station is a bonus station)

You could retrieve the live status of the station easily :

>>> station.status.available
24
>>> station.status.free
1

And we can retrieve the station ids around our station by distance :

>>> station.stations_around
[42006, 42010, 42012, 42014, 42016, ...]

Other methods on the Station objects are available, but the source is often more explicit.

Settings

You can change the settings of the applications by creating or editing the .veliberator.cfg file in your home directory, basing on the /etc/veliberator.cfg.

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

veliberator-0.2.3.tar.gz (76.5 kB view details)

Uploaded Source

File details

Details for the file veliberator-0.2.3.tar.gz.

File metadata

  • Download URL: veliberator-0.2.3.tar.gz
  • Upload date:
  • Size: 76.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for veliberator-0.2.3.tar.gz
Algorithm Hash digest
SHA256 d649e95e25f9f76c4094155046cdf6d9b794a8eb96c7ed2f9a4b9497a73accb8
MD5 0fdcbd793c7f0731aca6f77e247484f9
BLAKE2b-256 de06d99972585b71a19aea36135dac1fdfbfb48a7f94fd3d14d1145f36fdb891

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page