skillfed

pykml

Python KML library

pykml v0.2.0 247.3K downloads/30d#8,695 on PyPI
Permissive license BSD Abandoned released

What it is and what it does

pyKML is a Python library for reading and writing KML (Keyhole Markup Language) documents—the XML format used for geographic data in mapping applications. It wraps lxml.objectify to provide a Pythonic interface, so you can construct or parse KML documents as Python objects rather than manipulating raw XML strings.

The package was last released in 2019 and is now abandoned, meaning no bug fixes, security updates, or compatibility work are happening. It has a single runtime dependency on lxml and installs with low friction. If you're working with legacy KML data or maintaining older code that already uses it, it may still function; for new projects, you should evaluate whether a maintained alternative exists or whether hand-rolling KML generation with a modern XML library is more appropriate.

Use it for:

  • Parse KML files from mapping services or geographic data sources into Python objects for analysis.
  • Generate KML documents programmatically to feed into GIS tools or web mapping applications.
  • Convert between KML and other geographic data formats in a data pipeline.
  • Extract geographic coordinates and metadata from KML placemarks for geospatial queries.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

pyKML parses and creates KML documents using a Pythonic XML interface built on lxml.objectify, letting you read and write geographic markup programmatically.

No, unless you are maintaining legacy code that already depends on it. The package has been abandoned since 2019 with no maintenance, no visible repository, and no security updates. For new projects requiring KML support, evaluate maintained alternatives or use a general-purpose XML library with KML specifications. The low install friction and permissive license do not offset the maintenance risk.

Install

pykml on PyPI

pip

pip install pykml

uv

uv add pykml

poetry

poetry add pykml

Installing pykml

Before you install

Installation is straightforward with a single runtime dependency (lxml), but the package has been abandoned since 2019 with no maintenance activity or repository access visible. Use only if you need KML support in legacy code or have no active development requirements.

License in practice

BSD permissive license allows commercial and private use with minimal restrictions, making it suitable for most projects that can tolerate an unmaintained dependency.

Quickstart

pip install pykml

from pykml import kml

k = kml.KML()
doc = kml.Document(ns='http://www.opengis.net/kml/2.2')
k.append(doc)

Verify before relying

  • Whether lxml version compatibility issues exist with modern Python releases given the package's 2019 last release date.
  • Whether the package works with current KML specifications or only historical versions.
  • Active community forks or maintained alternatives for KML handling.

Package facts

License BSD (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 1 — lxml
Maintenance abandoned — 2,485 days since the last release
First released
Downloads 247,261/month — #8,695 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pykml-0.2.0-py3-none-any.whl

Keywords: kml

Development Status :: 2 - Pre-AlphaIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonTopic :: Multimedia :: Graphics :: ViewersTopic :: Scientific/Engineering :: GISTopic :: Scientific/Engineering :: VisualizationTopic :: Software Development :: Libraries :: Python Modules

Tags

kml parsing pythonkml document generationgeographic markup languagekml authoring libraryxml kml manipulationpython gis kmlkml to python objects
gisabandonedxml-parsing

More Python Modules packages