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.1.tar.gz
(5.5 kB
view hashes)
Built Distribution
Close
Hashes for pypublibike-2.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 054a5655ba717214608a23aabc744788e40ca27450cbc9386541da933e61ab16 |
|
MD5 | 2a9bf299ae2e46134a0184b0c3b862a1 |
|
BLAKE2b-256 | 521be844f87da38111034b7d3dae6046ccdf0dd271bb775da8510f39172304b5 |