skillfed

geojson

Python bindings and utilities for GeoJSON

geojson v3.3.0 4.4M downloads/30d#2,313 on PyPI994
Permissive license BSD Active released

What it is and what it does

geojson is a Python library for working with GeoJSON, the standard text-based format for encoding geographic data structures. It provides classes representing all GeoJSON object types—Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon, GeometryCollection, Feature, and FeatureCollection—along with encoding and decoding functions. Each class implements the __geo_interface__ specification, allowing objects to be used as attributes or indexed directly when nested in collections.

The library is designed for developers and researchers working with geographic information systems (GIS) data. It handles the conversion between Python objects and GeoJSON-formatted JSON, making it straightforward to construct geographic features programmatically, serialize them for storage or transmission, and parse incoming GeoJSON data. With no external dependencies and support for modern Python versions, it integrates easily into geospatial workflows.

Use it for:

  • Build geographic features (points, lines, polygons) and wrap them in Feature objects with properties for mapping applications.
  • Parse and validate incoming GeoJSON data from APIs or files into typed Python objects for further processing.
  • Serialize geographic data to GeoJSON format for storage in databases or transmission over HTTP to web mapping clients.
  • Construct FeatureCollections containing multiple geographic features with associated metadata for batch geospatial operations.
  • Implement __geo_interface__ on custom objects to make them compatible with GeoJSON serialization workflows.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Encodes, decodes, and represents GeoJSON formatted geographic data through Python classes for all GeoJSON object types and implements the __geo_interface__ specification.

Yes. geojson is a stable, actively maintained library with zero dependencies, permissive licensing, and no known vulnerabilities. It directly implements the GeoJSON specification and is well-suited for any Python project handling geographic data. Install it if you need to work with GeoJSON in a Python application.

Install

geojson on PyPI

pip

pip install geojson

uv

uv add geojson

poetry

poetry add geojson

Installing geojson

Before you install

Low friction install with no runtime dependencies. Actively maintained with recent releases; repository shows 994 stars and current Python version support (3.10–3.14).

License in practice

BSD permissive license allows use in most projects without significant restrictions on modification or distribution.

Quickstart

pip install geojson

from geojson import Point, Feature, FeatureCollection

point = Point((-115.81, 37.24))
feature = Feature(geometry=point, properties={"name": "example"})
collection = FeatureCollection([feature])

Requires Python 3.10 or later.

Package facts

License BSD (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 78 days since the last release
Last repo commit
First released
Downloads 4,395,724/month — #2,313 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: geojson-3.3.0-py3-none-any.whl

Keywords: gis, geography, json

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/Engineering :: GIS

Tags

geojson encoding decodinggeographic data pythongeojson objects classesgis data formatgeo interface specificationcoordinate geometry pythonfeature collection geometry
gisgeospatialjson-format

More GIS packages