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-1.2.0.tar.gz
(5.1 kB
view hashes)
Built Distribution
Close
Hashes for pypublibike-1.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55175d5e2f4d22151e4cd3dcc3143f356c7e065d555d7147211b86e0833dccc5 |
|
MD5 | aa619a073841d167abf0b322250b8ee8 |
|
BLAKE2b-256 | 868def549ed8a6923093a599e887b2a52921dd0acd91c75f6692084ec053ea93 |