Skip to main content

FastKML

A Python library for reading, writing and manipulating KML files.

Introduction

KML is an XML geospatial data format and an OGC standard that deserves a canonical python implementation.

Fastkml is a library to read, write and manipulate KML files. It aims to keep it simple and fast (using lxml if available). Fast refers to the time you spend to write and read KML files as well as the time you spend to get acquainted to the library or to create KML objects. It aims to provide all of the functionality that KML clients such as Marble, NASA WorldWind, Cesium JS, OpenLayers, Google Maps, and Google Earth support.

For more details about the KML Specification, check out the KML Reference on the Google developers site.

Features

  • Simple and fast: Easy-to-use API with fast performance

  • Geometry support: Handles geometries as pygeoif objects, compatible with any geometry that implements the __geo_interface__ protocol, such as shapely

  • Cross-platform compatibility: Tested on CPython, PyPy and GraalPy

  • Python 3.9+: Works on alternative Python implementations that support Python >=3.9

Status

Quality Assurance:

Test Tested with Hypothesis codecov.io Black Mypy pre-commit

Package Information:

Latest PyPI version Conda-Forge Development Status LGPL - License Supported Python versions Supported Python implementations Libraries.io dependency status for latest release Downloads

Documentation & Community:

Documentation Statistics from OpenHub

Installation

Basic Installation

Install the package using pip:

pip install fastkml

This will install FastKML with all required dependencies.

With Optional Dependencies

For enhanced performance, install with lxml:

pip install "fastkml[lxml]"

Using Conda

You can also install FastKML using conda-forge:

conda install -c conda-forge fastkml

Requirements

Required Dependencies

  • pygeoif - For geometry handling

  • arrow - For date and time processing

Optional Dependencies

  • lxml - For improved XML parsing performance (recommended)

Documentation

You can find all of the documentation for FastKML at fastkml.readthedocs.org. If you find something that is missing, please submit a pull request on GitHub with the improvement.

Limitations

Currently, the only major feature missing for the full Google Earth experience is the gx extension.

Please submit a PR with the features you’d like to see implemented.

Contributing

We welcome contributions! Please check out our contributing guide for guidelines on how to contribute.

Metadata

Release files for fastkml 1.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fastkml 1.4.0
File Size Uploaded
fastkml-1.4.0.tar.gz 91.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fastkml 1.4.0
File Interpreter ABI Platform
fastkml-1.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 205.9 kB

Release files / fastkml-1.4.0.tar.gz

Download URL fastkml-1.4.0.tar.gz
Size 91.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f9e09062f2e6557acb3618ecf6783a9329f4bb3f7e1d070a1b4d7bfab718e278
BLAKE2b-256 checksum
How to use checksums
d9b4490e0e3eea8ceb92cd859e931534283cf4f9d7cff495e2f110c23121d1af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2025.

Transparency log

Release files / fastkml-1.4.0-py3-none-any.whl

Download URL fastkml-1.4.0-py3-none-any.whl
Size 114.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9df25e165df9aebd0dea48ad76f10defd3553d61f88e37c03156772eeb357342
BLAKE2b-256 checksum
How to use checksums
4a73f70d48a91a9915ebb7215d41d7500f991c6f5b56d9d9d7e571e6df462b77
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

1.4.0 This release

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.12

2 release files

0.11

1 release file

0.9

2 release files

0.8

2 release files

0.7

1 release file

0.6

1 release file

0.5

1 release file

0.4

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page