Python API for Velib.
Project description
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 a free place to park a bike.
testing.py
Launch the tests suites packaged in the module.
Usage
To retrieve the informtions 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 >>> station.get_status() >>> station.status {'available': 24, 'ticket': True, 'total': 25, 'free': 0, 'datetime': datetime.datetime(2009, 7, 17, 12, 00, 00, 000000)}
And we can retrieve the station ids around our station by distance :
>>> station.get_stations_around() [42006, 42010, 42012, 42014, 42016] >>> station.get_stations_around(3) [42006, 42010, 42012]
Other methods on the Station objects are available, but the source is often more explicit.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file veliberator-0.1.9.tar.gz
.
File metadata
- Download URL: veliberator-0.1.9.tar.gz
- Upload date:
- Size: 73.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2085fac4adf29410cabffdb3b2378e088fcda1d4b6607a446f152e447d51bf38 |
|
MD5 | ef23c0eb9ff7f28a26c0eeafb1cdf54d |
|
BLAKE2b-256 | e93efab987b09d47f4082f89f505012610f253a40969a169f3c0cd27b972c88b |
File details
Details for the file veliberator-0.1.9-py2.6.egg
.
File metadata
- Download URL: veliberator-0.1.9-py2.6.egg
- Upload date:
- Size: 12.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 799e21983a587327b13b4c107a60ac20ae0b35d7f22304136e191c15c051c099 |
|
MD5 | 9b57d45057c6f85df262c2496ba52906 |
|
BLAKE2b-256 | 8bdb254c7654667e1244185e829f0df1c21baf17f387d1e7e44a7f852b68e372 |