flex
Swagger Schema validation.
What it is and what it does
Flex is a validation tool for Swagger 2.0 API specifications. It validates swagger schemas themselves, performs JSON Schema validation, and checks request and response objects against their declared schemas. It includes both a Python library and a command-line interface (swagger-flex as of version 5.0.0).
The package is no longer maintained—the last release was in 2019-09-14 and the last repository commit in 2022-09-22. It was originally designed for Python 2.7 and early Python 3 versions (3.3, 3.4, 3.5, 3.6), and its compatibility with modern Python is unknown. High installation friction (source build required) combined with abandonment makes it a risky choice for new projects unless you are locked into Swagger 2.0 validation and cannot use maintained alternatives.
Use it for:
- Validate a Swagger 2.0 specification file before deploying an API to ensure schema correctness.
- Test that API request and response payloads conform to their declared Swagger schema during development.
- Integrate Swagger validation into a legacy CI/CD pipeline that cannot be updated to OpenAPI 3.x tooling.
- Command-line validation of Swagger specs in build scripts using the swagger-flex CLI.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Validates Swagger 2.0 API specifications against JSON Schema and checks request/response objects for conformance, with a command-line interface.
No. The package is abandoned (last release 2019-09-14, last commit 2022-09-22) with high install friction and uncertain compatibility with modern Python. Swagger 2.0 itself is superseded by OpenAPI 3.x. Use only if forced to validate legacy Swagger 2.0 specs with no alternative; otherwise migrate to a maintained OpenAPI validator.
Install
flex on PyPI
pip
pip install flexuv
uv add flexpoetry
poetry add flexInstalling flex
Before you install
Installation requires building from source (high friction). The package is abandoned—last release was 2019-09-14, last commit 2022-09-22, with no active maintenance. Use only if you are locked into Swagger 2.0 validation and cannot migrate to maintained alternatives.
License in practice
BSD license is permissive and poses no restrictions on use, modification, or distribution in commercial or private projects.
Quickstart
pip install flex==6.14.1
from flex.core import validate
validate(swagger_spec_dict)
Package targets Python 2.7 and 3.3–3.6; compatibility with modern Python versions is unverified and likely broken.
Verify before relying
- Whether the package actually works on Python versions beyond 3.6 despite classifier claims.
- Current state of dependencies and whether they have known security issues or are themselves abandoned.
- Whether Swagger 2.0 validation is still the right choice versus migrating to OpenAPI 3.x tooling.
Package facts
| License | BSD (permissive) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | abandoned — 2,526 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 92,813/month — #13,424 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: flex-6.14.1.tar.gz
Keywords: rest, swagger
Tags
More Quality Assurance packages
Coverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
ruffRuff is a Python linter and code formatter…
permissive · top 1,000 on PyPI
pexpectPexpect spawns and controls interactive console…
permissive · top 1,000 on PyPI
blackBlack reformats Python source code to a…
permissive · top 1,000 on PyPI
pytest-xdistpytest-xdist distributes pytest tests across…
permissive · top 1,000 on PyPI
cfn-lintValidates AWS CloudFormation templates in YAML…
permissive · top 1,000 on PyPI
swagger-spec-validatorValidates Swagger/OpenAPI specifications…
permissive · top 15,000 on PyPI
openapi-spec-validatorValidates OpenAPI specifications (versions 2.0,…
permissive · top 1,000 on PyPI
prancePrance parses and validates Swagger/OpenAPI 2.0…
unclear · top 5,000 on PyPI
fastjsonschemaValidates JSON data against JSON Schema…
permissive · top 1,000 on PyPI
flask-swaggerExtracts Swagger 2.0 API specifications from…
permissive · top 15,000 on PyPI
openapi-schema-validatorValidates data and schemas against OpenAPI…
permissive · top 1,000 on PyPI
stix2-validatorValidates STIX 2.x JSON documents against the…
permissive · top 15,000 on PyPI
yamaleYamale validates YAML files against a schema…
permissive · top 5,000 on PyPI
spec-kitty-eventsProvides canonical event envelope contracts and…
permissive · top 15,000 on PyPI
cwltestcwltest validates the output of Common Workflow…
permissive · top 15,000 on PyPI