Provides Python bindings for the Libosmium C++ library, a library for working with OpenStreetMap data in a fast and flexible manner.
Pyosmium works with Python >= 3.4. Pypy is known to not work.
The recommended way to install pyosmium is via pip:
pip install osmium
We provide binary wheels for Linux and Windows 64 for all actively maintained Python versions.
For other versions, a source wheel is provided. Make sure to install all external dependencies first. On Debian/Ubuntu-like systems, the following command installs all required packages:
sudo apt-get install build-essential cmake libboost-dev \ libexpat1-dev zlib1g-dev libbz2-dev
pyosmium has the following dependencies:
Get the latest versions of libosmium, protozero and pybind11. It is
recommended that you put them in a subdirectory
contrib. You can also
set custom locations with
To use a custom boost installation, set
To compile the bindings, run
python setup.py build
To compile and install the bindings, run
python setup.py install [--user]
example directory contains small examples on how to use the library.
They are mostly ports of the examples in Libosmium and osmium-contrib.
There is a small test suite in the test directory. This provides regression test for the python bindings, it is not meant to be a test suite for Libosmium.
You'll need the Python
nose module. On Debian/Ubuntu install the package
python-nose. For Python2
mock is required as well (package
The suite can be run with:
cd test python run_tests.py
First compile the bindings as described above and then run:
cd doc make html
For building the man pages for the tools run:
cd doc make man
If you find bugs or have feature requests, please report those in the github issue tracker.
Pyosmium is available under the BSD 2-Clause License. See LICENSE.TXT.
Sarah Hoffmann (firstname.lastname@example.org)