Simple KML Creator

1.3.6 · active · verified Wed Apr 15

simplekml is a Python package designed for generating KML (Keyhole Markup Language) and KMZ files with minimal effort. It simplifies the creation of KML documents, folders, points, linestrings, and polygons without requiring in-depth knowledge of the KML standard itself. The current version is 1.3.6. Release cadence is infrequent, with the last update in 2021, and prior updates in 2020 and 2018.

Warnings

Install

Imports

Quickstart

This example demonstrates how to create a basic KML file with a single point named 'Kirstenbosch' at specified coordinates and save it to a file.

import simplekml

kml = simplekml.Kml()
kml.newpoint(name="Kirstenbosch", coords=[(18.432314, -33.988862)]) # Longitude, Latitude, optional height
kml.save("botanicalgarden.kml")

view raw JSON →