Skip to main content

Browse API documentation

Project description

api-browser

PyPI Tests Changelog License

Browse API documentation

Installation

You can use pipx to install this tool.

You can also use pip:

pip install api-browser

Usage

See api_browser --help for all details.

api_browser openapi <filename>

Load the OpenAPI file and show Redoc documentation. Refresh the page to load any changes to the OpenAPI file.

api_browser summary <filename>

Display a summary table of the API endpoints in the terminal.

api_browser schema <filename> <schema_name>

Display a schema from the OpenAPI file in a concise tree format. Required properties are marked with an asterisk (*).

api_browser urls <filename>

Display a tree view of URL segments from the OpenAPI file, showing how endpoints are hierarchically organized. Each endpoint shows its available operation IDs.

Example:

├── customers (listCustomers, createCustomer)
│   ├── {id} (getCustomer, updateCustomer, deleteCustomer)
│   │   └── orders (listCustomerOrders, createCustomerOrder)
│   │       └── {orderId} (getCustomerOrder, updateCustomerOrder, deleteCustomerOrder)
│   └── search (searchCustomers)
└── orders (listOrders, createOrder)
    └── {id} (getOrder, updateOrder, deleteOrder)

This visualization helps understand the API's URL structure, how different endpoints are related, and what operations are available at each endpoint.

api_browser validate <filename>

Validate an OpenAPI file against the OpenAPI 3.0 specification. Shows a checkmark (✓) if valid or an error message (✗) with details if there are validation issues.

Example of valid file:

✓ OpenAPI specification is valid

Example of invalid file:

✗ Error: 'openapi' is a required property

Development

Installation

Clone the repository and install the package in development mode with test dependencies:

pip install -e ".[test]"

Running Tests

Run all tests:

pytest

Update snapshots when output changes:

pytest --snapshot-update

Update specific test snapshots:

pytest -k "test_name" --snapshot-update

Commands

api-browser openapi <filename>

Start a local server to view the OpenAPI documentation in a web browser.

api-browser summary <filename>

Display a summary table of all API endpoints, including:

  • Path
  • HTTP Method
  • Operation ID
  • Status Code
  • Request Schema
  • Response Schema

api-browser schema <filename> <schema_name>

Display a schema from the OpenAPI file in a tree format. Required properties are marked with an asterisk (*).

Example:

Schema: User
* indicates required property

├── id* (integer)
├── name* (string)
├── email (string)
└── address (Address)
    ├── street* (string)
    ├── city (string)
    └── country (string)

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

api_browser-0.2.0.tar.gz (13.8 kB view details)

Uploaded Source

Built Distribution

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

api_browser-0.2.0-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file api_browser-0.2.0.tar.gz.

File metadata

  • Download URL: api_browser-0.2.0.tar.gz
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for api_browser-0.2.0.tar.gz
Algorithm Hash digest
SHA256 9935c981fd8bf24ff75e5d850951a4c0322de89fc7d26fd59013283667cf6c02
MD5 c4e81af6e7af338b35d7a975977bac47
BLAKE2b-256 1bcedd71f44e9e7611952835b2ff560b64dc7a327eb4a493324f5e222f80a29d

See more details on using hashes here.

Provenance

The following attestation bundles were made for api_browser-0.2.0.tar.gz:

Publisher: publish.yml on smizell/api-browser

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file api_browser-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: api_browser-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 12.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for api_browser-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5b650f1925ff6ff8a194f46a02ef4fd380f31082aacee1088bfa4f09972f3a4e
MD5 9e78c319eecb7f4c132d582105d07f34
BLAKE2b-256 1dd9acefb27e036318e112c5b0900e30b26dcf5f3eca3e3206563e83717a3118

See more details on using hashes here.

Provenance

The following attestation bundles were made for api_browser-0.2.0-py3-none-any.whl:

Publisher: publish.yml on smizell/api-browser

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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