Skip to main content

Python tools to work with OpenAPI schemas

Project description

OpenAPI Kit

Python tools to work with OpenAPI schemas

build codecov PyPI version


Documentation: https://frankie567.github.io/openapi-kit/

Source Code: https://github.com/frankie567/openapi-kit


OpenAPI TUI

Explore any OpenAPI schema right in your terminal — no browser required.

uvx openapi-kit view https://petstore3.swagger.io/api/v3/openapi.json

You can also point it at a local file:

uvx openapi-kit view ./my-api.yaml

Features

  • Endpoints browser — all routes grouped by tag in a navigable tree, with per-endpoint details across dedicated tabs: Info, Path parameters, Query parameters, Headers, Request body, and Responses.
  • Schemas browser — browse every component schema with a full property table including types, constraints, and required markers.
  • Schema navigation — clickable schema links inside endpoint and schema detail panels let you jump straight to the referenced type, with breadcrumb-style back navigation.
  • Live reload — press Ctrl+R to re-fetch the schema from its original source without leaving the TUI.
  • Keyboard-driven — switch between Endpoints (E) and Schemas (S) views, quit with Q or Ctrl+C.

Screenshots

Endpoints list

Endpoints list

Endpoint detail

Endpoint detail

Schemas list

Schemas list

Schema detail

Schema detail

OpenAPI Diff

Compare two OpenAPI schemas and output the differences.

uvx openapi-kit diff ./v1.yaml ./v2.yaml

The diff command supports both JSON and Markdown output formats:

# Markdown output (default)
uvx openapi-kit diff ./v1.yaml ./v2.yaml

# JSON output
uvx openapi-kit diff ./v1.yaml ./v2.yaml --format json

Features

  • Endpoint comparison: Detects added, removed, and modified endpoints
  • Schema changes: Identifies schema additions, removals, and modifications
  • Detailed output: Shows exactly what changed in each endpoint or schema
  • Multiple formats: Choose between human-readable Markdown or machine-readable JSON output
  • URL and file support: Compare schemas from local files or remote URLs

Example Output

The diff command outputs a structured comparison showing:

# OpenAPI Schema Diff

## Endpoints

### Added

- POST /new-endpoint

### Removed

- GET /old-endpoint

### Modified

- GET /updated-endpoint
    - Description changed
    - Added new query parameter

## Schemas

### Added

- NewSchema

### Removed

- OldSchema

### Modified

- UpdatedSchema
    - Added new property
    - Changed type constraint

This makes it easy to review API changes between versions and generate changelogs.


Development

Setup environment

We use uv to manage the development environment and production build, and just to manage command shortcuts. Ensure they are installed on your system.

Run unit tests

You can run all the tests with:

just test

Format the code

Execute the following command to apply linting and check typing:

just lint

Regenerate screenshots

The screenshots in this README are generated from a live Petstore schema using Textual's headless mode:

uv run scripts/generate_screenshots.py

Publish a new version

You can bump the version, create a commit and associated tag with one command:

just version patch
just version minor
just version major

Your default Git text editor will open so you can add information about the release.

When you push the tag on GitHub, the workflow will automatically publish it on PyPi and a GitHub release will be created as draft.

Serve the documentation

You can serve the Mkdocs documentation with:

just docs-serve

It'll automatically watch for changes in your code.

License

This project is licensed under the terms of the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openapi_kit-0.1.0.tar.gz (90.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

openapi_kit-0.1.0-py3-none-any.whl (27.2 kB view details)

Uploaded Python 3

File details

Details for the file openapi_kit-0.1.0.tar.gz.

File metadata

  • Download URL: openapi_kit-0.1.0.tar.gz
  • Upload date:
  • Size: 90.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for openapi_kit-0.1.0.tar.gz
Algorithm Hash digest
SHA256 80e2a2e197008a3709f3ffe7324f98ccd509a7b6314039a1602455d1873b13b8
MD5 31310260214b6ad3943fd8281dbd0878
BLAKE2b-256 b33c3eff96eff8cbc565203cb55fb7d1b1127912b79cd67f9fab3a93dcefdefd

See more details on using hashes here.

File details

Details for the file openapi_kit-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: openapi_kit-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 27.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for openapi_kit-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c326c9e11eaa9c67365d5697488b72057fdae64cdbd5c1c1e30ae602eca11715
MD5 129901868560a0762528b5b03f600859
BLAKE2b-256 6e8c8813dc15254e319f0821ef897d864589e35d4ef8aab0acaae9aa6892a264

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page