skillfed

flex

Swagger Schema validation.

flex v6.14.1 92.8K downloads/30d#13,424 on PyPI151
Permissive license BSD Abandoned released

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 flex

uv

uv add flex

poetry

poetry add flex

Installing 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

Intended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseNatural Language :: EnglishProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6

Tags

swagger 2.0 validationopenapi schema validatorrest api specification checkerjson schema validationswagger spec complianceapi contract testingswagger cli tool
swagger-validationlegacy-api-tooling

More Quality Assurance packages