Skip to main content

Swagger-like UI for Pandera dataframe schemas

Project description

pandera-ui

Swagger-like documentation UI for Pandera dataframe schemas.

Point it at any Python project and instantly browse every discovered schema: columns, dtypes, validation checks, nullability, titles, and descriptions in one searchable UI. 🚀

PyPI Python CI Codecov License

Demo

Pandera UI screenshot

Why use it

  • Zero config: run one command, get a UI ⚡
  • Two-pass extraction: runtime import first, AST fallback when imports fail 🧠
  • Fast navigation: filter by type/source, sort by columns/name, full-text search 🔎
  • CI-friendly: export JSON with --json for tooling and automation 🔁
  • Ready for teams: dark/light theme and EN/RU/FR/DE localization 🌍

Quick start

# Scan current directory and open the UI at http://localhost:8765
pandera-ui .

# Scan a specific project
pandera-ui /path/to/myproject --port 9000

# Print JSON instead of starting a server
pandera-ui . --json

Installation

pip install pandera-ui

Or with uv:

uv add pandera-ui

Requires Python 3.10+.

Docker

docker run --rm \
  -v /path/to/myproject:/project:ro \
  -p 8765:8765 \
  ghcr.io/darius-krsk/pandera-ui:latest

Or with docker-compose:

PROJECT_PATH=/path/to/myproject docker compose up

What gets extracted

Schema style Example Support
pa.DataFrameSchema(...) orders = pa.DataFrameSchema(...) Full
pa.DataFrameModel subclass class Orders(pa.DataFrameModel) Full
File with import errors imports a missing library AST fallback

Per column: name, dtype, nullable, required, checks (with parameters), title, description.

Per schema: name, coerce, title, description, index, source file, variable/class name.

AST fallback

If a file cannot be imported (missing dependency, DB connection at module level, etc.), pandera-ui falls back to static AST analysis (no import side effects). Dynamic schemas built from variables or function calls can be partially resolved and are marked with an AST badge.

Python API

from pandera_ui import scan_project

schemas = scan_project("./myproject")
for schema in schemas:
    print(schema.name, [c.name for c in schema.columns])

scan_project returns a list of SchemaMetadata Pydantic models. See pandera_ui/models.py for the full structure.

CLI reference

Usage: pandera-ui [OPTIONS] [PROJECT_PATH]

  Scan PROJECT_PATH for Pandera schemas and serve a documentation UI.

Arguments:
  [PROJECT_PATH]  Project root to scan  [default: .]

Options:
  -p, --port INTEGER  Port for the UI server  [default: 8765]
  --host TEXT         Host to bind  [default: 127.0.0.1]
  --json              Print JSON to stdout, do not start server
  --help              Show this message and exit.

Architecture

pandera_ui/
  scanner.py   # discovery + extraction (runtime import -> AST fallback)
  models.py    # Pydantic models: SchemaMetadata, ColumnMetadata, CheckMetadata
  server.py    # FastAPI: GET /api/schemas, GET /
  cli.py       # Typer CLI entry point
frontend/
  index.html   # single-page UI (vanilla JS, no build step)

Development

git clone https://github.com/darius-krsk/pandera-ui
cd pandera-ui
make setup
make setup-ui-tests

# Core checks
make lint
make type
make test

# Coverage run
make test-cov

# Optional browser UI tests (requires Playwright browser install)
make test-ui

# Run UI against fixtures
make run

If you prefer raw commands, see CONTRIBUTING.md.

License

MIT

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

pandera_ui-0.1.0.tar.gz (370.0 kB view details)

Uploaded Source

Built Distribution

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

pandera_ui-0.1.0-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pandera_ui-0.1.0.tar.gz
  • Upload date:
  • Size: 370.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pandera_ui-0.1.0.tar.gz
Algorithm Hash digest
SHA256 040736741151a1b297210304081058630028fbec38ef74aca1c55046dceaba6b
MD5 6420fc80ef9a164b03e552187bfd1f7c
BLAKE2b-256 797bb6ba0feafedc1dadbdfe0a11e77e3f3777c6ddf64888e95b0810a5f47417

See more details on using hashes here.

Provenance

The following attestation bundles were made for pandera_ui-0.1.0.tar.gz:

Publisher: publish.yml on Darius1223/pandera-ui

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

File details

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

File metadata

  • Download URL: pandera_ui-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pandera_ui-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2158d36fdef0b3f4ff42abf65029058a7f8c6ffb59603be6fa2693b6cc72834a
MD5 0bef9587a465a9929c27a68f9396bb7c
BLAKE2b-256 a7e921f43d6d1454f5964770efeb018553409a7d19e926534cbd60fbb3171174

See more details on using hashes here.

Provenance

The following attestation bundles were made for pandera_ui-0.1.0-py3-none-any.whl:

Publisher: publish.yml on Darius1223/pandera-ui

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