gpxpy
GPX file parser and GPS track manipulation library
Decision gist · record as of 2026-08-14
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.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.6 or later.
- Optional: lxml library for faster XML parsing; minidom is used as fallback.
- Low friction: pure Python wheel with no runtime dependencies.
License · maintenance · safety
Apache License, Version 2.0 (permissive) — Apache License, Version 2.0 is permissive, allowing commercial and private use with minimal restrictions—suitable for most projects.
last release 2023-11-29 (989 days) · last repo commit 2024-11-24 · 1,107 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 524,634 downloads/mo, #6,188 on PyPI
Alternatives
Verify before relying
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())- 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
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 on this page. Verify before relying on it.
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
gpxpy on PyPI
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.
Requires Python 3.6 or later. Optional: lxml library for faster XML parsing; minidom is used as fallback.
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())
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 the current Python release >=3.6 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Dormant 989 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 524,634 / month, #6,188 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Programming Language :: PythonProgramming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8 |
Evidence: gpxpy-1.6.2-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “gpx file parser”
- gpxpyParses, manipulates, and generates GPX files (XML-based GPS track…
- INIToolsINITools parses and manipulates INI-style configuration files through…
- iniparseiniparse is an INI file parser that preserves formatting (comments,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Utilities packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.
Install it if you need to display or transform source code.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
See also fit-tool · gps3 · dicttoxml · xmltodict · svgpathtools · pynmeagps · pykml · pyrtcm · fastkml · xmlunittest