Metadata-Version: 2.4
Name: mthds
Version: 0.2.0
Summary: The Python interface for methods — base structures for structured outputs and the base runner for executing methods via API.
Project-URL: Homepage, https://mthds.ai
Project-URL: Repository, https://github.com/mthds-ai/mthds
Project-URL: Documentation, https://docs.mthds.ai/
Project-URL: Changelog, https://github.com/mthds-ai/mthds/releases
Author-email: "Evotis S.A.S." <oss@pipelex.com>
Maintainer-email: Pipelex staff <oss@pipelex.com>
License-Expression: MIT
License-File: LICENSE
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
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: Programming Language :: Python :: 3.14
Requires-Python: <3.15,>=3.10
Requires-Dist: backports-strenum>=1.3.0; python_version < '3.11'
Requires-Dist: httpx<1.0.0,>=0.23.0
Requires-Dist: pydantic<3.0.0,>=2.10.6
Requires-Dist: semantic-version<3.0.0,>=2.10.0
Requires-Dist: tomli<3.0.0,>=2.0.0; python_version < '3.11'
Requires-Dist: tomlkit>=0.12.0
Requires-Dist: typing-extensions>=4.0.0
Provides-Extra: dev
Requires-Dist: mypy==1.19.1; extra == 'dev'
Requires-Dist: pylint==4.0.4; extra == 'dev'
Requires-Dist: pyright==1.1.408; extra == 'dev'
Requires-Dist: pytest-mock<4.0.0,>=3.12.0; extra == 'dev'
Requires-Dist: pytest-sugar>=1.0.0; extra == 'dev'
Requires-Dist: pytest<9.0.0,>=8.0.0; extra == 'dev'
Requires-Dist: ruff==0.14.13; extra == 'dev'
Description-Content-Type: text/markdown

# mthds

The Python interface for methods — base structures for structured outputs and the base runner for executing methods via API.

Learn more at [mthds.ai](https://mthds.ai) and browse the Hub at [mthds.sh](https://mthds.sh).

## Runners

This package provides the base structures that define methods and their structured outputs, as well as the base runner that executes methods through API calls. Other runners have been implemented on top of it:

- [Pipelex](https://github.com/Pipelex/pipelex) — a full-featured runner

## Related packages

- [`mthds`](https://www.npmjs.com/package/mthds) (npm) — **CLI to install methods** + light client

## Installation

```bash
pip install mthds
```

## Quick Start

```bash
# Configure the API runner (default)
mthds config set api-key YOUR_KEY
mthds config set api-url https://your-api-instance.com

# Run a pipe
mthds run my_pipe_code

# Validate the manifest
mthds validate

# Initialize a new package
mthds package init
```

## API Configuration

The default runner is `api`. To use it, configure your Pipelex API credentials:

```bash
mthds config set api-key YOUR_KEY
mthds config set api-url https://your-api-instance.com
```

Credentials are stored in `~/.mthds/credentials` and shared between mthds-python and mthds-js.

You can also use environment variables, which take precedence over the credentials file:

| Variable | Description | Default |
|----------|-------------|---------|
| `PIPELEX_API_KEY` | API authentication key | (empty) |
| `PIPELEX_API_URL` | API base URL | `https://api.pipelex.com` |
| `MTHDS_RUNNER` | Default runner (`api` or `pipelex`) | `api` |

See `mthds config list` to view all current settings and their sources.

For the full CLI reference, see [CLI.md](./CLI.md).
