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
ebike = station.ebikes[0] # access the bikes/ebikes of the station
ebike.batteryLevel # access information about a bike
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
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-3.0.0.tar.gz
(5.6 kB
view hashes)
Built Distribution
Close
Hashes for pypublibike-3.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2cde010f69b942115063b83eb4e3ee71a3bd8d360dd86e0d80fbe43f70fcfc1 |
|
MD5 | 6a5204ff963514c475ab9f105f6b0d49 |
|
BLAKE2b-256 | b2561f23d57abfa94775c57190226f1a5603753d591574ee01e926785185a612 |