--- id: gpxpy version: "1.6.2" license: Apache License, Version 2.0 license_treatment: permissive maintenance: dormant --- # gpxpy — GPX file parser and GPS track manipulation library License: permissive · Maintenance: dormant · Downloads: 524.6K/mo ## What it is and what it does gpxpy is a Python library for reading, writing, and manipulating GPX files—the standard XML format for GPS tracks, routes, and waypoints. It abstracts the GPX schema into Python objects (tracks, segments, points, waypoints, routes) that you can parse from files, modify programmatically, and serialize back to valid XML. The library handles both GPX 1.0 and 1.1 versions automatically, preserves extensions, and provides utility methods for calculating statistics like distance and speed while filtering out common GPS errors. It has no external runtime dependencies and installs as a pure Python wheel, making it lightweight and portable. The library is mature (first released 2012-03-21) and widely adopted, though maintenance is dormant—the last release was 2023-11-29. It supports Python 3.6 and later, with optional use of lxml for faster XML parsing if available. Use it for: - Parse GPS track files from fitness devices or mapping applications to extract and analyze coordinate, elevation, and timing data. - Build a GPS track editor or organizer that reads GPX, modifies waypoints or segments, and writes the result back to file. - Calculate statistics from GPS tracks (distance, speed, elevation gain) with built-in heuristics to filter GPS noise. - Convert between GPX 1.0 and 1.1 formats or add custom extensions to GPX documents for application-specific metadata. - Programmatically generate GPX files from coordinate data (e.g., from a route planner or survey tool). ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Parses, manipulates, and generates GPX files (XML-based GPS track format), supporting both GPX 1.0 and 1.1 with track, route, waypoint, and segment management. Yes. gpxpy is a stable, dependency-free parser for a standard format with strong adoption. Dormant maintenance is acceptable here because GPX is a stable XML schema unlikely to change; the repository remains active. Install it if you need to read, write, or manipulate GPS tracks in Python. ## Install pip install gpxpy uv add gpxpy poetry add gpxpy ## Installing gpxpy Before you install: Low friction: pure Python wheel with no runtime dependencies. Maintenance is dormant (last release 2023-11-29, 989 days ago), but the repository remains active with recent commits. License in practice: Apache License, Version 2.0 is permissive, allowing commercial and private use with minimal restrictions—suitable for most projects. Quickstart: import gpxpy import gpxpy.gpx # Parse an existing GPX file gpx_file = open('track.gpx', 'r') gpx = gpxpy.parse(gpx_file) # Access tracks, waypoints, routes for track in gpx.tracks: for segment in track.segments: for point in segment.points: print(f'({point.latitude}, {point.longitude})') # Create and serialize new GPX gpx_new = gpxpy.gpx.GPX() gpx_track = gpxpy.gpx.GPXTrack() gpx_new.tracks.append(gpx_track) print(gpx_new.to_xml()) Requires Python 3.6 or later. Optional: lxml library for faster XML parsing; minidom is used as fallback. Verify before relying: - Whether lxml is automatically installed or must be added separately for the performance improvement mentioned - Current test coverage and whether the dormant status indicates stability or potential compatibility issues with newer Python versions ## Package facts - License: Apache License, Version 2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 524.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags gpx file parser, gps track parsing, gpx manipulation library, parse gps coordinates, track waypoint editor, xml gps format, gpx to python objects, gps-geolocation, xml-parsing, data-format [View on SkillFed](https://skillfed.io/packages/gpxpy) · [View on PyPI](https://pypi.org/project/gpxpy/)