diff options
Diffstat (limited to 'README.adoc')
-rw-r--r-- | README.adoc | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/README.adoc b/README.adoc index b628a68..5479979 100644 --- a/README.adoc +++ b/README.adoc @@ -260,6 +260,30 @@ With the tile server running, you can then open a HTML file like the following: </html> ---- +== PYTHON INTERFACE + +This program comes with a Python interface, which allows easy use from Python +scripts. The `hittekaart_py` subfolder in the repository is an installable +module. + +The Python API is documented in the docstrings, and at +https://docs.fietsboek.org/developer/module/hittekaart_py.html. An example +program may look like: + +[source,python] +---- +from hittekaart_py import ( + Track, HeatmapRenderer, Storage, generate +) + +tracks = [ + Track.from_file(b"Documents/track.gpx", None), + Track.from_coordinates([(45.0, 47.0)]), +] +storage = Storage.Sqlite(b"/tmp/tiles.sqlite") +generate(tracks, HeatmapRenderer(), storage) +---- + == BUGS Feel free you report bugs on the issue tracker at |