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.1.tar.gz
(5.1 kB
view hashes)
Built Distribution
Close
Hashes for pypublibike-1.2.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba0f2880f198f0cdf53559f7f7223b4267bff04ca8dbcf2f1cc97469ce17a98e |
|
MD5 | 6e434c0a9ad50683a6ba0ac1b5baa8a5 |
|
BLAKE2b-256 | 82db3ce0255c499a6d9ab065544e276214dd2892c5c320d941811d67304a53da |