Skip to content

⚡️🚲 A python wrapper around the PubliBike API

License

Notifications You must be signed in to change notification settings

Yoekkul/pypublibike

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚡️🚲 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

About

⚡️🚲 A python wrapper around the PubliBike API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%