Welcome to FastKML’s documentation!

Fastkml is continually tested with Travis CI:

https://api.travis-ci.org/cleder/fastkml.png https://coveralls.io/repos/cleder/fastkml/badge.png?branch=master

Is Maintained and documented:

Latest PyPI version Development Status https://readthedocs.org/projects/fastkml/badge/ https://www.openhub.net/p/fastkml/widgets/project_thin_badge.gif

Follows best practises:

Code Health

Supports python 2 and 3:

Supported Python versions Supported Python implementations

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 with the library or to create KML objects. It provides a subset of KML and is aimed at documents that can be read from multiple clients such as openlayers and google maps rather than to give you all functionality that KML on google earth provides.

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


Why yet another KML library? None of the existing ones quite fit my requirements, namely:

  • fastkml can read and write KML files, feeding fastkml’s output back into fastkml and serializing it again will result in the same output.
  • You can parse any KML snippet, it does not need to be a complete KML document.
  • It runs on Python 2 and 3.
  • It is fully tested and actively maintained.
  • Geometries are handled in the __geo_interface__ standard.
  • Minimal dependencies, pure Python.
  • If available, lxml will be used to increase its speed.