Metadata-Version: 2.4
Name: py-forge-studio
Version: 0.1.0a3
Summary: Python client for the Forge Studio API
Project-URL: Homepage, https://forge-studio.tech
Project-URL: Documentation, https://github.com/Forge-Systems/forge-py#readme
Project-URL: Repository, https://github.com/Forge-Systems/forge-py
Project-URL: Bug Tracker, https://github.com/Forge-Systems/forge-py/issues
Author-email: Forge Systems <support@forge-studio.tech>
License-Expression: LicenseRef-Proprietary
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.9
Requires-Dist: anyio>=4.0
Requires-Dist: httpx>=0.27
Requires-Dist: pydantic>=2.0
Provides-Extra: dev
Requires-Dist: pyright>=1.1; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.21; extra == 'dev'
Requires-Dist: pytest-timeout>=2.0; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Requires-Dist: respx>=0.20; extra == 'dev'
Requires-Dist: ruff>=0.4; extra == 'dev'
Description-Content-Type: text/markdown

# py-forge-studio

Python client for the Forge Studio API.

## Install

```bash
pip install py-forge-studio
```

## Quick start

```python
from py_forge import Client

client = Client()  # uses FORGE_API_KEY env var

repo = client.repositories.create(name="my-repo", repo_type_key="TST")
branch = client.branches.create(repo.id, name="main-work")
node = client.nodes.create(repo.id, branch.id, node_data={
    "@type": "Folder",
    "@id": "Folder_1",
    "doc_string": "My first node",
})
print(f"Created node {node.id} on branch {branch.id}")
```

## Authentication

Set `FORGE_API_KEY` and `FORGE_BASE_URL` as environment variables:

```bash
export FORGE_API_KEY="your-api-key"
export FORGE_BASE_URL="https://your-instance.forge-studio.tech/api"
```

Or pass them directly:

```python
client = Client(
    api_key="your-api-key",
    base_url="https://your-instance.forge-studio.tech/api",
)
```

Each Forge instance has its own URL in the form `https://<instance>.forge-studio.tech/api`. Contact your Forge account team if you don't know your instance name.

## Usage highlights

| Topic | Example |
|---|---|
| Quick start | [`examples/quickstart.py`](examples/quickstart.py) |
| Repositories | [`examples/repositories.py`](examples/repositories.py) |
| Branches | [`examples/branches.py`](examples/branches.py) |
| Nodes | [`examples/nodes.py`](examples/nodes.py) |
| Merge & rebase | [`examples/merge_and_rebase.py`](examples/merge_and_rebase.py) |
| Async usage | [`examples/async_usage.py`](examples/async_usage.py) |

## Requirements

Python >= 3.9
