--- id: prance version: "26.7.19.0" license: MITNFA license_treatment: unclear maintenance: active --- # prance — Resolving Swagger/OpenAPI 2.0 and 3.0.0 Parser License: unclear · Maintenance: active · Downloads: 6.2M/mo ## What it is and what it does Prance is a parser and validator for Swagger/OpenAPI specifications that handles both local file paths and remote URLs. It extends standard JSON reference resolution to work with OpenAPI's non-URI relative file paths, which standard JSON reference libraries do not support. The package provides two main parsing modes: ResolvingParser, which follows and resolves all JSON references into a flat specification dictionary, and BaseParser, which parses without resolving references. The package includes a command-line interface for validating specs, compiling them into fully resolved output files, and converting older Swagger 2.0 specs to OpenAPI 3.0 format via an external web service. It depends on chardet, ruamel.yaml, requests, and packaging for core functionality, and delegates actual validation to pluggable backends (openapi-spec-validator, swagger-spec-validator, or flex) that you install separately. Use it for: - Validate and resolve Swagger/OpenAPI specs in CI/CD pipelines before deploying API services - Parse OpenAPI specifications from files or URLs into Python dictionaries for code generation or documentation tools - Compile multi-file API specs with external references into single resolved output files for distribution - Convert legacy Swagger 2.0 definitions to OpenAPI 3.0 format programmatically - Extract and flatten API specifications containing JSON references for analysis or transformation ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Prance parses and validates Swagger/OpenAPI 2.0 and 3.0 specifications in Python, resolving JSON references and external file paths according to the OpenAPI standard. Yes, if you need to parse or validate OpenAPI/Swagger specs in Python. The package is actively maintained, has low install friction, and fills a real gap in reference resolution. Clarify the MITNFA license before use in proprietary contexts. Avoid the flex backend due to deprecated dependencies with known security issues. ## Install pip install prance uv add prance poetry add prance ## Installing prance Before you install: Low friction install with a pure-wheel distribution. Active maintenance as of 2026-07-19 with recent releases. Requires Python 3.10 or later. Optional validation backends (openapi-spec-validator, swagger-spec-validator, flex) must be installed separately; flex is deprecated and carries security risks in its dependencies. License in practice: License treatment is unclear (MITNFA). Verify the actual license terms before using in proprietary or restricted-license projects. Quickstart: pip install prance from prance import ResolvingParser parser = ResolvingParser('path/to/swagger.yaml') spec = parser.specification # fully resolved spec as dict Requires Python 3.10 or later. A validation backend (openapi-spec-validator, swagger-spec-validator, or flex) must be installed separately for validation to work. Verify before relying: - Whether MITNFA license is MIT-compatible or a custom variant requiring legal review - Whether the package works correctly with all modern Python versions (3.10–3.14) despite Beta status - Performance characteristics when resolving large or deeply nested specifications ## Package facts - License: MITNFA (unclear) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 6.2M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags openapi specification parser, swagger validation python, json reference resolver, api spec validator, openapi 3.0 parser, swagger 2.0 resolver, spec reference resolution, api-specification, openapi-swagger [View on SkillFed](https://skillfed.io/packages/prance) · [View on PyPI](https://pypi.org/project/prance/)