Metadata-Version: 2.5
Name: dynamics-client-pukna
Version: 0.2.0
Summary: Client library to easaly work within the ms dynamics universe
Author-email: PommereningMartin <37418568+PommereningMartin@users.noreply.github.com>
Requires-Python: >=3.11
Requires-Dist: pytest>=9.1.1
Requires-Dist: requests>=2.34.2
Description-Content-Type: text/markdown

# dynamics-client-pukna

Simple, thread-safe OAuth2 client-credentials authentication and a lightweight Dataverse (Microsoft Dynamics 365) OData client for Python.

## Features

- `TokenManager` — acquires and caches Azure AD access tokens automatically.
- `DataverseClient` — thin wrapper around the Dataverse Web API with `get`, `get_list`, `create`, `update`, `delete`.
- Thread-safe, minimal dependencies (`requests` only).

## Installation

pip install dynamics-client-pukna

## Requirements

- Python 3.8+
- Azure AD App Registration with a client secret
- A Dataverse Application User linked to that app, with a security role assigned

## Quick Start

from dynamics_client import TokenManager
from dynamics_client.dataverse_client import DataverseClient

token_manager = TokenManager(
tenant_id="...", client_id="...", client_secret="...",
resource="https://yourorg.crm.dynamics.com",
)

client = DataverseClient(token_manager=token_manager, base_url="https://yourorg.crm.dynamics.com")

accounts = client.get_list("accounts", query="$select=name&$top=5")

See the [full documentation](https://github.com/yourname/dynamics-auth#readme) for the API reference, error handling, and building custom entity services.

## License

MIT