A python wrapper around the PubliBike API
Project description
⚡️🚲 pypublibike - A python wrapper round the PubliBike API
pypublibike makes it easy to access the PubliBike API in your own Python projects.
Quick Start
$ pip install pypublibike
Examples
Getting a list of all PubliBike stations
from pypublibike import publibike, station
pb = publibike.PubliBike()
for station in pb.getStations():
station.refresh() # refresh load data of station
print(station.numEbikes)
Finding the nearest PubliBike station
from pypublibike import publibike, location
pb = publibike.PubliBike()
ourLocation = location.Location(latitude=46.950043, longitude=7.443169)
nearestStation = pb.findNearestStationTo(ourLocation)
nearestStation.refresh()
print(nearestStation.name)
Getting Help
-
Open a issue on GitHub if you run into any problems
-
Contact me on Twitter
Todo
- API documentation
- Error handling
- Add unittests
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
pypublibike-2.0.0.tar.gz
(5.4 kB
view hashes)
Built Distribution
Close
Hashes for pypublibike-2.0.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8950545aaafd96521e558aba590d24853507bc028532bdaa519a2d103aba944b |
|
MD5 | c6302c4610fcdc223f17ea8fd5cd2157 |
|
BLAKE2b-256 | 0922d996e6810fffa5600f5dc372525332d8a8006c166170f9751c60c87aa8e2 |