Metadata-Version: 2.4
Name: folio-sdk
Version: 0.1.0
Summary: Publish HTML reports as shareable, hosted URLs — Folio Python SDK
Project-URL: Homepage, https://folio.ac
Project-URL: Documentation, https://folio.ac/docs
License: MIT
Keywords: agents,ai,folio,html,publish,reports
Requires-Python: >=3.8
Requires-Dist: requests>=2.20
Description-Content-Type: text/markdown

# folio-sdk

Publish HTML reports as shareable, hosted URLs — [Folio](https://folio.ac) Python SDK.

```bash
pip install folio-sdk
```

## Usage

```python
import folio

folio.configure("fol_your_key_here")  # or set FOLIO_API_KEY env var

url = folio.publish(html, title="Q2 Analysis")
print(url)  # → https://folio.ac/r/abc123
```

Get your API key at [folio.ac/dashboard](https://folio.ac/dashboard).

## Options

```python
url = folio.publish(
    html,
    title="Q2 Revenue",
    expires_in_days=30,   # 7 | 14 | 30 | 90 (default: 7)
    password="secret",    # optional gate
    custom_slug="q2-rev", # → folio.ac/you/r/q2-rev
)
```

## Agent / LLM usage

```python
import anthropic, folio

folio.configure("fol_your_key_here")
client = anthropic.Anthropic()

msg = client.messages.create(
    model="claude-opus-4-7",
    max_tokens=8096,
    messages=[{"role": "user", "content": "Analyse this data and return a full HTML report with charts."}],
)

url = folio.publish(msg.content[0].text, title="Analysis")
print(f"Report: {url}")
```

## Links

- [Docs](https://folio.ac/docs)
- [Dashboard](https://folio.ac/dashboard)
