Metadata-Version: 2.3
Name: pydantic-graph-studio
Version: 0.2.0
Summary: A lightweight studio/CLI scaffold for pydantic-graph projects.
Keywords: pydantic,pydantic-graph,graph,studio
Author: Thomas Chaigneau
Author-email: Thomas Chaigneau <thomas@chainyo.dev>
License: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Dist: fastapi>=0.110.0
Requires-Dist: pydantic-graph>=1.50.0
Requires-Dist: uvicorn>=0.29.0
Requires-Python: >=3.12
Description-Content-Type: text/markdown

# Pydantic Graph Studio

A lightweight studio/CLI scaffold for `pydantic-graph` projects.

## Quickstart with uvx

Run built-in examples without cloning the repo:

```bash
uvx pydantic-graph-studio example list
uvx pydantic-graph-studio example graph
uvx pydantic-graph-studio example parallel-joins
```

Built-in example themes:
- `graph` (branching and loops)
- `parallel-joins` (parallel/fork-join)
- `error-handling` (explicit error path and recovery)
- `tool-usage` (tool invocation and result handling)
- `streaming-events` (event-rich run)
- `human-in-the-loop` (simulated user input step)

The studio opens in your browser automatically. It binds to port 8000 by default and retries 8001 if 8000 is already in use and you did not set `--port`.

Common flags:
- `--no-open` to disable browser auto-open
- `--host` to change the bind host
- `--port` to choose a specific port

## Run your own graph

Use the CLI with a module or file reference:

```bash
pgraph module:graph
pgraph path/to/file.py:graph
```

You can also run with uvx directly:

```bash
uvx pydantic-graph-studio module:graph
uvx pydantic-graph-studio path/to/file.py:graph
```

If the graph has multiple entry nodes, pass `--start` with the node id.

## Examples in this repo

The repository examples are in `examples/`:

```bash
pgraph examples/graph.py:graph
pgraph examples/parallel_joins.py:graph
pgraph examples/error_handling.py:graph
pgraph examples/tool_usage.py:graph
pgraph examples/streaming_events.py:graph
pgraph examples/human_in_the_loop.py:graph
```

## Release

Releases are published automatically to PyPI via GitHub Actions using Trusted Publishing (OIDC).

Release rules:
- Tag format MUST be `vX.Y.Z` (e.g., `v0.2.0`)
- Tag version MUST match `version` in `pyproject.toml`
- Publish happens when a GitHub Release is published

Process:
1. Update `version` in `pyproject.toml`
2. Create a git tag `vX.Y.Z`
3. Publish a GitHub Release from that tag

Notes:
- The PyPI project must be configured for Trusted Publishing with this GitHub repository.
