Browse API documentation
Project description
api-browser
Browse API documentation
Installation
You can use pipx to install this tool.
- Install pipx
- Run
pipx install api-browser
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9935c981fd8bf24ff75e5d850951a4c0322de89fc7d26fd59013283667cf6c02
|
|
| MD5 |
c4e81af6e7af338b35d7a975977bac47
|
|
| BLAKE2b-256 |
1bcedd71f44e9e7611952835b2ff560b64dc7a327eb4a493324f5e222f80a29d
|
Provenance
The following attestation bundles were made for api_browser-0.2.0.tar.gz:
Publisher:
publish.yml on smizell/api-browser
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
api_browser-0.2.0.tar.gz -
Subject digest:
9935c981fd8bf24ff75e5d850951a4c0322de89fc7d26fd59013283667cf6c02 - Sigstore transparency entry: 158284381
- Sigstore integration time:
-
Permalink:
smizell/api-browser@ba7d81630a06a5212efa770b9d93f06c704e3039 -
Branch / Tag:
refs/tags/0.2.0 - Owner: https://github.com/smizell
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ba7d81630a06a5212efa770b9d93f06c704e3039 -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b650f1925ff6ff8a194f46a02ef4fd380f31082aacee1088bfa4f09972f3a4e
|
|
| MD5 |
9e78c319eecb7f4c132d582105d07f34
|
|
| BLAKE2b-256 |
1dd9acefb27e036318e112c5b0900e30b26dcf5f3eca3e3206563e83717a3118
|
Provenance
The following attestation bundles were made for api_browser-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on smizell/api-browser
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
api_browser-0.2.0-py3-none-any.whl -
Subject digest:
5b650f1925ff6ff8a194f46a02ef4fd380f31082aacee1088bfa4f09972f3a4e - Sigstore transparency entry: 158284382
- Sigstore integration time:
-
Permalink:
smizell/api-browser@ba7d81630a06a5212efa770b9d93f06c704e3039 -
Branch / Tag:
refs/tags/0.2.0 - Owner: https://github.com/smizell
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ba7d81630a06a5212efa770b9d93f06c704e3039 -
Trigger Event:
release
-
Statement type: