From 8025f682fdd49b4e52b4356952ec1f64890d6c4c Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Tue, 29 Jul 2025 21:46:30 +0200 Subject: more docs They are actually visible as Python docstrings, so they are useful! --- README.adoc | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'README.adoc') 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: ---- +== 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 -- cgit v1.2.3