Metadata-Version: 2.4
Name: avaril
Version: 1.1.0
Summary: DPDPA consent management client for the Avaril public SDK API
Author: Avaril
License: ISC
Project-URL: Homepage, https://github.com/Avaril/avaril-py
Project-URL: Bug Tracker, https://github.com/Avaril/avaril-py/issues
Keywords: avaril,consent,dpdpa,privacy
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: cryptography>=41
Requires-Dist: msgpack>=1.0
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == "dev"

# Avaril — DPDPA consent management

Client for the Avaril public SDK API (`/api/sdk/*`), authenticated with a
publishable key (`av_pk_*`). Zero dependencies (stdlib only).

```python
from avaril import AvarilClient

client = AvarilClient("av_pk_live_...")

config = client.fetch_config()
for purpose in config["consent"]["purposes"]:
    print(purpose["title"])

result = client.record_consent(
    event_id="b1f2...",
    subject_id="anonymous-subject-123",
    preferences={"analytics": True, "marketing": False},
)
print("duplicate" if result["duplicate"] else "recorded")

client.withdraw_consent(event_id="c3d4...", subject_id="anonymous-subject-123")
```



Errors are raised as `avaril.errors.AvarilError` carrying the API's
`code`/`message` and the HTTP status. All methods return the parsed JSON
response bodies as `dict`s.
