Metadata-Version: 2.5
Name: athyr
Version: 0.1.5
Summary: Athyr automation SDK — the execution core the worker runs and an author imports
License-Expression: LicenseRef-Proprietary
License-File: LICENSE
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Typing :: Typed
Requires-Python: >=3.12
Requires-Dist: loguru>=0.7
Provides-Extra: cli
Requires-Dist: cryptography>=44; extra == 'cli'
Requires-Dist: keyring>=25; extra == 'cli'
Provides-Extra: dev
Requires-Dist: mypy>=1.11; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Description-Content-Type: text/markdown

# athyr

The Athyr automation SDK — the execution core an Athyr worker runs, and the
`athyr` command an author writes and runs automations with. One distribution
carries both: there is no second package to install for the CLI.

```console
$ pip install athyr           # the library and the athyr command
$ pip install "athyr[cli]"    # ...and OS keychain storage for `athyr login`
```

Python 3.12 or newer.

## The library

`import athyr` is the surface an automation is written against, and it is the
same module the fleet's worker binds at run time — which is what makes a flow
run the same way on a laptop and in a job.

```python
import athyr


@athyr.flow
def invoice_sync(since: str, batch_size: int = 2) -> dict[str, int]:
    """The parameters are the argument schema: `since` required, the other not."""
    endpoint = athyr.asset("sap-endpoint-url")
    password = athyr.credential("sap-gateway")

    with athyr.step("fetch", since=since):
        invoices = fetch(endpoint, since, password)

    athyr.progress(len(invoices), "fetched")
    return {"posted": post_all(invoices, batch_size)}
```

`athyr.log` is the logger, `athyr.testing` runs a flow against a fixture
envelope so plain pytest can exercise one, and secrets read through
`athyr.credential` are redacted from everything the run writes.

## The command

| Command | |
|---|---|
| `athyr init` | Scaffold a new automation project. |
| `athyr login` | Sign in and store a personal access token for this machine. |
| `athyr whoami` | Show who the stored token belongs to. |
| `athyr run` | Run a flow on this machine, the way the fleet runs it. |
| `athyr package` | Build the deployable artifact and the registration that publishes it. |

## Licence

Proprietary — see `LICENSE`. Published by the Athyr project; the source lives
in a private repository, so there is no public issue tracker to link.
