--- id: fastkml version: "1.4.0" license: LGPL license_treatment: copyleft maintenance: active --- # fastkml — Fast KML processing in python License: copyleft · Maintenance: active · Downloads: 280.7K/mo ## What it is and what it does FastKML is a Python library for reading, writing, and manipulating KML files—an XML-based geospatial format standardized by the OGC. It wraps KML structures into Python objects, handling geometries through pygeoif (compatible with shapely and other __geo_interface__ implementations) and dates through arrow. The library aims for simplicity and speed, with optional lxml support for faster XML parsing. Typical use cases include converting between KML and Python data structures, extracting geographic features from KML files, and building KML output programmatically. It supports modern Python versions (3.9+) across CPython, PyPy, and GraalPy, and is compatible with geospatial clients like Google Earth, Google Maps, OpenLayers, and Cesium JS. Use it for: - Parse KML files from mapping applications (Google Earth, Marble, NASA WorldWind) into Python geometry objects for analysis. - Generate KML output from geographic data to visualize in web maps or desktop GIS clients. - Convert between KML and other geospatial formats by leveraging pygeoif's geometry abstraction. - Extract and manipulate geographic features (points, lines, polygons) embedded in KML documents. - Build geospatial data pipelines that consume or produce KML as an interchange format. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Reads, writes, and manipulates KML files—an XML-based geospatial data format—using a simple Python API with support for geometry objects and date/time handling. Yes. FastKML is actively maintained, has no known vulnerabilities, installs with low friction, and solves a clear problem: KML file handling in Python. The LGPL license requires derivative works to remain open-source, which is a constraint for proprietary projects but not a blocker for most uses. Suitable for anyone working with KML data in geospatial workflows. ## Install pip install fastkml uv add fastkml poetry add fastkml ## Installing fastkml Before you install: Low friction install with three core runtime dependencies (arrow, pygeoif, typing-extensions). Actively maintained as of 2025-11-04 with recent commits; no known vulnerabilities. License in practice: Licensed under LGPL (copyleft); derivative works and modifications must remain open-source under compatible terms, which may constrain proprietary use. Quickstart: pip install fastkml from fastkml import kml k = kml.KML() # Read, write, or manipulate KML objects Requires Python 3.9 or later; optional lxml dependency improves XML parsing performance. Verify before relying: - Whether the library fully implements all KML 2.2 specification features beyond the documented gx extension limitation. - Performance characteristics when handling large KML files or complex geometries. ## Package facts - License: LGPL (copyleft) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 280.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags kml file parsing python, read write kml files, geospatial xml processing, kml geometry handling, kml to python objects, geospatial, kml, xml-parsing [View on SkillFed](https://skillfed.io/packages/fastkml) · [View on PyPI](https://pypi.org/project/fastkml/)