Metadata-Version: 2.4
Name: eunomia-sdk-python
Version: 0.3.2
Summary: Eunomia SDK for Python
Author-email: What About You team <info@whataboutyou.ai>
License-Expression: Apache-2.0
Requires-Python: >=3.10
Requires-Dist: eunomia-core>=0.3.2
Requires-Dist: httpx>=0.28.1
Description-Content-Type: text/markdown

# Eunomia SDK for Python

This package allows you to integrate [Eunomia][eunomia-github] inside your Python application, providing a client to interact with the Eunomia server.

## Installation

Install the `eunomia-sdk-python` package via pip:

```bash
pip install eunomia-sdk-python
```

## Usage

Create an instance of the `EunomiaClient` class to interact with the Eunomia server.

```python
from eunomia_sdk_python import EunomiaClient

client = EunomiaClient()
```

You can then call any server endpoint through the client. For example, you can check the access of a principal to a resource:

```python
is_allowed = client.check(
    principal_attributes={"role": "admin"},
    resource_attributes={"type": "confidential"},
)

print(f"Is allowed: {is_allowed}")
```

## Documentation

For detailed usage, check out the SDK's [documentation][docs].

[eunomia-github]: https://github.com/whataboutyou-ai/eunomia
[docs]: https://whataboutyou-ai.github.io/eunomia/api/sdks/python/
