{"id":21757,"library":"pykml","title":"pyKML","description":"Python KML (Keyhole Markup Language) library for parsing, constructing, and manipulating KML files. Version 0.2.0 is the current release; it is in maintenance mode with infrequent updates.","status":"maintenance","version":"0.2.0","language":"python","source_language":"en","source_url":"https://github.com/cleder/pykml","tags":["kml","geospatial","gps","google-earth","xml"],"install":[{"cmd":"pip install pykml","lang":"bash","label":"Default install from PyPI"}],"dependencies":[],"imports":[{"wrong":"from pykml import KML","symbol":"KML","correct":"import pykml"}],"quickstart":{"code":"from pykml import parser\nfrom lxml import etree\n\nkml_str = '''<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<kml xmlns=\"http://www.opengis.net/kml/2.2\">\n  <Document>\n    <Placemark>\n      <name>Test</name>\n    </Placemark>\n  </Document>\n</kml>'''\n\nroot = parser.fromstring(kml_str)\nplacemark = root.Document.Placemark\nprint(placemark.name.text)","lang":"python","description":"Parse a KML string and access element attributes."},"warnings":[{"fix":"pip install lxml","message":"pykml requires lxml as a dependency; it is not automatically installed if you use pip without lxml already present. Install lxml explicitly.","severity":"gotcha","affected_versions":"all"},{"fix":"Use the pykml.factory module with KML_ElementMaker for generating KML.","message":"The library uses a non-standard namespace model with capitalized 'KML' classes, which can cause confusion when working with standard lxml methods.","severity":"deprecated","affected_versions":">=0.1.0"}],"env_vars":null,"search_vec":"'0.2.0':16 'construct':10 'current':19 'earth':34 'file':14 'geospati':30 'googl':33 'google-earth':32 'gps':31 'infrequ':27 'keyhol':4 'kml':3,13,29 'languag':6 'librari':7 'mainten':24 'manipul':12 'markup':5 'mode':25 'pars':9 'pykml':1 'python':2 'releas':20 'updat':28 'version':15 'xml':35","created_at":"2026-04-27T17:01:35.381846+00:00","updated_at":"2026-04-27T17:01:35.381846+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.2.0","cli_name":"","cli_version":null,"type":"library","homepage":"http://pypi.python.org/pypi/pykml","github":null,"docs":null,"changelog":null,"pypi":"https://pypi.org/project/pykml/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["serialization","data"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-08-02","install_tag":null}}