Metadata-Version: 2.5
Name: yamlin
Version: 0.5.0
Summary: Add your description here
Author-email: Bart Frenk <bart.frenk@gmail.com>
Requires-Python: >=3.12
Requires-Dist: keyring>=25.7.0
Requires-Dist: pyyaml>=6.0.2
Description-Content-Type: text/markdown

# yamlin

A small YAML loader with custom tags for resolving values at load time —
secrets from the OS keychain, values from the environment, and async
placeholders — then dumps the resolved result back out as plain YAML.

## Install

```sh
uv add yamlin
```

## Tags

- `!keyring <service>/<secret id>` — looks up a secret via
  [`keyring`](https://pypi.org/project/keyring/).
- `!env <NAME>` — looks up an environment variable.
- `!sleep <seconds>` — waits, then resolves to the number of seconds
  (useful for testing concurrent resolution).

## Example

```yaml
# config.yaml
database:
  password: !keyring myapp/db-password
  host: !env DB_HOST
```

```sh
uv run keyring set myapp db-password   # store the secret once
export DB_HOST=localhost

yamlin -f config.yaml
```

```yaml
database:
  host: localhost
  password: <value stored in the keychain>
```

Omit `-f` to read from stdin, and add `-o <file>` to write to a file instead
of stdout.
