Metadata-Version: 2.4
Name: diffuse-hub
Version: 0.4.36
Summary: Python SDK and command-line interface for the Diffuse research data platform.
Project-URL: Homepage, https://hub.diffuse.science
Project-URL: Documentation, https://hub.diffuse.science/cli-docs
Project-URL: Repository, https://github.com/diff-use/webapp
Project-URL: Issues, https://github.com/diff-use/webapp/issues
Author: Diffuse Team
License: Apache-2.0
Keywords: cli,diffuse,experiments,ml,research,sdk
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.12
Requires-Dist: httpx>=0.27.2
Provides-Extra: cli
Requires-Dist: pyyaml>=6.0; extra == 'cli'
Requires-Dist: rich>=14.2.0; extra == 'cli'
Requires-Dist: tenacity>=9.0.0; extra == 'cli'
Requires-Dist: typer>=0.12.4; extra == 'cli'
Provides-Extra: sdk
Description-Content-Type: text/markdown

# diffuse-hub

Python SDK and command-line interface for the [Diffuse](https://hub.diffuse.science) research data platform.

Manage experiments, metadata, and artifacts from your terminal or programmatically from notebooks and scripts.

## Installation

```bash
# Full install (CLI + SDK)
pip install "diffuse-hub[cli]"

# SDK only (lightweight, no CLI deps)
pip install diffuse-hub
```

Or run the CLI without installing:

```bash
uvx --from "diffuse-hub[cli]" diffuse --help
```

For a persistent CLI install on your PATH:

```bash
uv tool install "diffuse-hub[cli]"
diffuse --help
```

## Quickstart

### CLI

```bash
diffuse auth login
diffuse experiments list
diffuse experiments create --title "My Experiment" --tags ml,vision
diffuse artifacts upload ./data.h5 --experiment EXP-1
```

Run `diffuse --help` for the full command reference.

### SDK

```python
from diffuse_cli.sdk import Diffuse

diffuse = Diffuse()  # reads config / env vars for auth

experiments = diffuse.experiments.list(query="tag:crystal", sort="recent")
exp = diffuse.experiments.get("EXP-1")

artifacts = diffuse.artifacts.list(experiment="EXP-1")
url = diffuse.artifacts.download_url("abc123")
```

## Configuration

The CLI reads `~/.diffuse/config.json` and the following environment variables:

| Variable | Purpose |
|---|---|
| `DIFFUSE_API_URL` | Override the API base URL |
| `DIFFUSE_API_KEY` | Authenticate with a personal / system API key (`dfk_...`) |
| `DIFFUSE_ENV` | Shorthand: `local` or `prod` |

## Links

- Platform: https://hub.diffuse.science
- CLI reference: https://hub.diffuse.science/cli-docs
- Source & issues: https://github.com/diff-use/webapp

## License

Apache-2.0
