Metadata-Version: 2.5
Name: nova-data-ai-skylab
Version: 0.1.0
Summary: Fetch and render SkyLab prompts at runtime
Project-URL: Homepage, https://github.com/nova-data-ai/nova-web
License: UNLICENSED
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# nova-data-ai-skylab

Fetch and render SkyLab prompts at runtime, so prompt text lives in SkyLab
rather than hardcoded in your repo.

Requires Python 3.10 or newer.

```bash
uv add nova-data-ai-skylab
```

The distribution is `nova-data-ai-skylab`; the import is `skylab`.

```python
import os

from skylab import SkylabClient

skylab = SkylabClient(api_key=os.environ["SKYLAB_API_KEY"])

prompt = skylab.get_prompt("code-review")
text = prompt.render(language="Python", concern="race conditions")
```

## API

| Method | Description |
| --- | --- |
| `get_prompt(slug, version=None)` | Live version by default; pass `version` to pin |
| `list_prompts(tags=None, tags_mode=None, updated_since=None)` | Prompt summaries |
| `clear_cache()` | Drop cached prompts |

`prompt.render(**values)` substitutes `{{ variable }}` placeholders and raises
`MissingVariablesError` if any value is absent.

## Options

```python
SkylabClient(
    api_key=None,      # falls back to SKYLAB_API_KEY when omitted
    base_url=None,     # defaults to SKYLAB_API_URL, then production
    cache_ttl=60.0,    # seconds; 0 disables caching
    timeout=10.0,
)
```

Omitting `api_key` reads `SKYLAB_API_KEY` from the environment, which is handy in
a script or a one-off. Pass it explicitly in anything long-lived so the client's
credentials are visible where it is constructed.

Standard library only — no runtime dependencies.
