Metadata-Version: 2.5
Name: yeaply
Version: 0.1.0
Summary: Ask a person for a decision on their phone, end to end encrypted. One call.
Project-URL: Homepage, https://yeaply.com
Author: LOUMI Education LLC
License-Expression: MIT
License-File: LICENSE
Keywords: approval,decision,e2ee,human-in-the-loop,yeaply
Classifier: Framework :: AsyncIO
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9
Requires-Dist: httpx>=0.27
Requires-Dist: pynacl>=1.5
Provides-Extra: test
Requires-Dist: pytest-asyncio>=0.24; extra == 'test'
Requires-Dist: pytest>=8; extra == 'test'
Description-Content-Type: text/markdown

# yeaply (Python)

Ask a person for a decision on their phone, end to end encrypted, in one call. See [yeaply.com](https://yeaply.com).

```python
import yeaply

y = yeaply.connect("Deploy bot", url="https://example.com")   # first run: prints a pairing code, waits
answer = y.ask(
    "Deploy v2.3 to production?",
    body="12 commits since v2.2.",
    facts={"Branch": "main"},
    options=["Deploy", {"id": "hold", "label": "Hold", "style": "danger"}],
    timeout="1h",          # withdraws the question and raises YeaplyError("timeout")
)
print(answer.option_id, answer.label, answer.note, answer.answered_at)
```

asyncio:

```python
y = await yeaply.aio.connect("Deploy bot")
answer = await y.ask("Deploy?", options=["Yes", "No"])
```

- `y.send(...)` returns a handle: `h.answer(timeout=...)`, `h.withdraw()`, `h.state()`; `y.handle(packet_id)` resumes after a restart.
- `stop = y.on_answer(callback)` (a background thread; in asyncio a task, and the callback may be async).
- Keys live in `key_file` (default `~/.config/yeaply/<name>.json`, mode 0600; same format as the JS SDK) or in
  `YEAPLY_KEYS` (from `y.export_keys()`).
- Every answer is checked against the hash of the exact question sent; a mismatch raises `YeaplyError("answer_rejected")`.

Needs PyNaCl (libsodium) and httpx. MIT, LOUMI Education LLC.
