polyline
A Python implementation of Google's Encoded Polyline Algorithm Format.
Decision gist · record as of 2026-08-14
Yes, if you need to work with Google's Encoded Polyline format. The package is lightweight, dependency-free, and widely used (top 5000 on PyPI). Maintenance is aging but the code is stable and no vulnerabilities are known. The MIT license is permissive. Install it if your application requires polyline encoding/decoding; skip it if you don't work with this specific format.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.8 or above; Python 2 is not supported in v2.0.4.
- Low install friction with no runtime dependencies.
- Maintenance status is aging—last release 255 days ago—but the repository remains active and the package has been stable since its 2014 inception.
License · maintenance · safety
(unclear) — MIT license (inferred from license text). Permissive; you may use, modify, and distribute freely with attribution and without warranty.
last release 2025-12-02 (255 days) · last repo commit 2025-12-02 · 125 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,499,132 downloads/mo, #3,037 on PyPI
Alternatives
Verify before relying
pip install polyline
import polyline
# Encode coordinates to polyline string
encoded = polyline.encode([(38.5, -120.2), (40.7, -120.9), (43.2, -126.4)], 5)
# Decode polyline string back to coordinates
decoded = polyline.decode('u{~vFvyys@fS]', 5)- Whether the package handles edge cases (e.g., very large coordinate sets, extreme precision values) reliably.
- Performance characteristics for encoding/decoding large polyline datasets.
- Whether geojson parameter behavior is fully documented and tested.
What it is and what it does
Polyline is a Python implementation of Google's Encoded Polyline Algorithm Format, a standard method for compressing sequences of latitude/longitude coordinates into a compact string representation. It converts between human-readable coordinate tuples and the compressed format used by mapping APIs, supporting both (lat, lon) and GeoJSON (lon, lat) coordinate orders. The package has no runtime dependencies and works with Python 3.8 and above.
Typically used in mapping and geolocation applications to reduce bandwidth when transmitting routes, paths, or coordinate sequences over the network. You provide a list of coordinate pairs and a precision level, and the encoder produces a compressed string; the decoder reverses the process. The library is a port of Mapbox's polyline implementation with additional features, making it suitable for applications that need to serialize geographic data efficiently.
Use it for
- Compress GPS route data for transmission to mapping APIs or storage in databases.
- Decode polyline strings returned by Google Maps or other mapping services into coordinate lists.
- Reduce payload size when sending coordinate sequences over HTTP in web or mobile applications.
- Convert between coordinate formats (lat/lon vs. GeoJSON) for compatibility with different mapping libraries.
- Encode walking or driving routes for display on interactive maps with minimal data transfer.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to work with Google's Encoded Polyline format.
The package is lightweight, dependency-free, and widely used (top 5000 on PyPI). Maintenance is aging but the code is stable and no vulnerabilities are known. The MIT license is permissive. Install it if your application requires polyline encoding/decoding; skip it if you don't work with this specific format.
Install
polyline on PyPI
Before you install
Low install friction with no runtime dependencies. Maintenance status is aging—last release 255 days ago—but the repository remains active and the package has been stable since its 2014 inception.
Requires Python 3.8 or above; Python 2 is not supported in v2.0.4.
License in practice
MIT license (inferred from license text). Permissive; you may use, modify, and distribute freely with attribution and without warranty.
Quickstart
pip install polyline
import polyline
# Encode coordinates to polyline string
encoded = polyline.encode([(38.5, -120.2), (40.7, -120.9), (43.2, -126.4)], 5)
# Decode polyline string back to coordinates
decoded = polyline.decode('u{~vFvyys@fS]', 5)
Verify before relying
- Whether the package handles edge cases (e.g., very large coordinate sets, extreme precision values) reliably.
- Performance characteristics for encoding/decoding large polyline datasets.
- Whether geojson parameter behavior is fully documented and tested.
Package facts
| License | Not declared unclear |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Aging 255 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,499,132 / month, #3,037 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: polyline-2.0.4-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 › “polyline encoding decoding”
- polylineEncodes and decodes geographic coordinate sequences using Google's…
- flexpolylineEncodes and decodes geographic coordinate sequences into a compressed…
- pypolylineEncodes and decodes Google Polyline format coordinates using Rust…
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 flexpolyline · geobuf · topojson · pypolyline · staticmap · python-geohash · mapbox-vector-tile · searoute · geolib · lat-lon-parser