aboutsummaryrefslogtreecommitdiff
path: root/README.adoc
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2025-08-25 21:54:13 +0200
committerDaniel Schadt <kingdread@gmx.de>2025-08-25 21:54:13 +0200
commit888c23d0b9c50ff457be2cb300afe634f1d6fa59 (patch)
tree9ef388ad197a89b48a02a6e5a88529d15e68036b /README.adoc
parent6adcd94a6747fe7ec6f1ad1073453636847a0bff (diff)
parente888344ba561bc6a52f96f7a7bc2ad24be287a82 (diff)
downloadhittekaart-888c23d0b9c50ff457be2cb300afe634f1d6fa59.tar.gz
hittekaart-888c23d0b9c50ff457be2cb300afe634f1d6fa59.tar.bz2
hittekaart-888c23d0b9c50ff457be2cb300afe634f1d6fa59.zip
Merge branch 'py'
Diffstat (limited to 'README.adoc')
-rw-r--r--README.adoc25
1 files changed, 25 insertions, 0 deletions
diff --git a/README.adoc b/README.adoc
index b628a68..65256fd 100644
--- a/README.adoc
+++ b/README.adoc
@@ -260,6 +260,31 @@ 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, Settings, Storage, generate
+)
+
+settings = Settings(threads=3)
+tracks = [
+ Track.from_file(b"Documents/track.gpx", None),
+ Track.from_coordinates([(45.0, 47.0)]),
+]
+storage = Storage.Sqlite(b"/tmp/tiles.sqlite")
+generate(settings, tracks, HeatmapRenderer(), storage)
+----
+
== BUGS
Feel free you report bugs on the issue tracker at