The purpose of CycleOSM is to download structured bike infrastructure data from Open Street Map (OSM).
Now on PyPi
This package is easy to use. You can get started by installing the package:
pip install cycleosm
Then import the BikeOSM module.
from cycleosm.bikeosm import BikeOSM
Next define the output directory and the .pbf url
output_path = r'/Users/danielpatterson/Documents/GitHub/ExtractOSM/src/output'
urls = {'District of Columbia': 'http://download.geofabrik.de/north-america/us/district-of-columbia-latest.osm.pbf'}
Finally, extract the pbf
BikeOSM(urls, output_path).handle_pbfs()