--- id: geojson version: "3.3.0" license: BSD license_treatment: permissive maintenance: active --- # geojson — Python bindings and utilities for GeoJSON License: permissive · Maintenance: active · Downloads: 4.4M/mo ## 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 above — 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 pip install geojson uv add geojson 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_current - Install friction: low - Maintenance: active - Downloads: 4.4M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags geojson encoding decoding, geographic data python, geojson objects classes, gis data format, geo interface specification, coordinate geometry python, feature collection geometry, gis, geospatial, json-format [View on SkillFed](https://skillfed.io/packages/geojson) · [View on PyPI](https://pypi.org/project/geojson/)