--- id: geojson-pydantic version: "2.1.1" license: MIT License Copyright (c) 2020 Development Seed Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to… (full text in the JSON record) license_treatment: permissive maintenance: active --- # geojson-pydantic — Pydantic data models for the GeoJSON spec. License: permissive · Maintenance: active · Downloads: 1.1M/mo ## What it is and what it does geojson-pydantic wraps the GeoJSON specification (RFC 7946) as a set of Pydantic models, letting you validate, parse, and serialize geographic data structures with type safety. It depends only on pydantic and works with Python 3.9 through 3.14, making it straightforward to integrate into data pipelines that need to handle GeoJSON. The package is actively maintained, supports current Python versions, and has no known vulnerabilities. It's used for creating or validating GeoJSON objects—Points, LineStrings, Polygons, Features, and FeatureCollections—ensuring data conforms to the RFC 7946 standard before processing or storage. Use it for: - Validate incoming GeoJSON from APIs or files before storing in a geospatial database. - Build type-safe geographic data structures in Python applications using Pydantic's validation framework. - Serialize Python geographic objects to RFC 7946-compliant GeoJSON for REST APIs or client applications. - Parse and transform GeoJSON from external sources with automatic type checking and error reporting. - Integrate geospatial data validation into FastAPI or other Pydantic-based web services. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides Pydantic models that validate and serialize GeoJSON data according to RFC 7946 specification. Yes. The package has low install friction, active maintenance, permissive MIT licensing, no security vulnerabilities, and fills a clear need for GeoJSON validation in Python. It's a straightforward choice if you're working with geographic data and want Pydantic's validation guarantees. ## Install pip install geojson-pydantic uv add geojson-pydantic poetry add geojson-pydantic ## Installing geojson-pydantic Before you install: Low friction install with a single runtime dependency on pydantic. Repository is active with a recent commit on 2026-07-24 and no archived status. License in practice: MIT License permits commercial and private use with minimal restrictions; you may use, modify, and distribute the software freely provided you include the license notice. Quickstart: pip install geojson-pydantic from geojson_pydantic import Point point = Point(coordinates=[1.0, 2.0]) print(point.model_dump_json()) ## Package facts - License: MIT License Copyright (c) 2020 Development Seed Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to… (full text in the JSON record) (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 1.1M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags geojson validation pydantic, geojson models python, rfc7946 geojson, geographic data validation, geojson serialization, spatial data pydantic models, geojson type checking, geospatial, data-validation, geojson [View on SkillFed](https://skillfed.io/packages/geojson-pydantic) · [View on PyPI](https://pypi.org/project/geojson-pydantic/)