client Module

Classes

DataverseClient

High-level client for Microsoft Dataverse operations.

This client provides a simple, stable interface for interacting with Dataverse environments through the Web API. It handles authentication via Azure Identity and delegates HTTP operations to an internal OData client.

Key capabilities:

  • OData CRUD operations: create, read, update, delete records

  • SQL queries: execute read-only SQL via Web API ?sql parameter

  • Table metadata: create, inspect, and delete custom tables; create and delete columns

  • File uploads: upload files to file columns with chunking support

Note

The client lazily initializes its internal OData client on first use, allowing lightweight construction without immediate network calls.

Note

All methods that communicate with the Dataverse Web API may raise

HttpError on non-successful

HTTP responses (e.g. 401, 403, 404, 429, 500). Individual method

docstrings document only domain-specific exceptions.

Operations are organized into namespaces:

  • client.records – create, update, delete, and get records (single or paginated queries)

  • client.query – query and search operations

  • client.tables – table and column metadata management

  • client.files – file upload operations

  • client.dataframe – pandas DataFrame wrappers for record CRUD

  • client.batch – batch multiple operations into a single HTTP request

v0 beta methods (client.create, client.query_sql, etc.) were removed in 1.0 GA. Calling one now raises AttributeError with a message naming the GA replacement and the codemod command – previously these calls raised a bare AttributeError with no migration hint, so debugging half-migrated code was painful. See _REMOVED_BETA_METHODS.

The client supports Python's context manager protocol for automatic resource cleanup and HTTP connection pooling: