Veliberator
Veliberator is a Python module who provides an API for getting the informations related to the stations of the Velib’ bike renting network.
API Usage
To retrieve the informations of a station you only have to have the ID of the station and a database synchronized with all the available stations.
Then in your Python interpreter you can play with the API:
>>> 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 the GPS coordonates)
lng (the longitude of the GPS coordonates)
opened (True if the station is open)
bonus (True 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 >>> station.status.total 25 >>> station.status.closed 0
More useful, you can retrieve the closest stations sorted by distance:
>>> station.stations_around [<StationInformation "42006" (23 RUE PIERRE BROSSOLETTE)>, <StationInformation "42010" (1 RUE ROBESPIERRE)>, ...]
The veliberator script
Write an API for developers is a nice idea, but write an useful script who uses the API for the end-user is a much nicer idea.
So the package provide a script named veliberator.
For exemple if I need to know the status of the Velib’ station with the ID: 42008, I simply need to run this command:
$ veliberator 42008
This command will display the status of the station and find other stations around if no parking place are available.
The veliberator script can also find the Velib’ stations around an address, by simply launching the script.
Note that at the first run of the script a database will be created for registering all the available stations.
For update or create the database you can run this command:
$ veliberator --synchronize
Run this command for more informations:
$ veliberator -h
Settings
The veliberator module can be configured by a configuration file. Take a look on the file etc/veliberator-sample.cfg for having a example of the options availables.
The module is going to look in your home directory if a file named .veliberator.cfg is present and in etc/veliberator.cfg from your current working directory.
Metadata
Release files for veliberator 0.3.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| veliberator-0.3.3.tar.gz | 87.7 kB | Without provenance | Details for veliberator-0.3.3.tar.gz |
Release files / veliberator-0.3.3.tar.gz
| Download URL | veliberator-0.3.3.tar.gz |
|---|---|
| Size | 87.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
04ff0161e054711f4fdcaa56127820163268aed2c17bebc9652de237836e120e
|
|
BLAKE2b-256 checksum How to use checksums |
7a20e900d5ffbe81943692ec4d2dd98eb7869af35d7b0123c0762a40aaf15ec5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for veliberator 0.3.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.