dataverse-python — GitHub Copilot rule: Dataverse SDK for Python
A GitHub Copilot rule that tells the agent how to set up the Dataverse Python SDK: install, environment variables and OAuth.
.github/instructions/dataverse-python.instructions.mdWhat dataverse-python does
The rule covers the Dataverse Python SDK end to end: installing the package, configuring environment variables for the tenant, client ID, secret and resource URL, then authenticating over OAuth and running CRUD operations. The agent gets those steps as context instead of guessing at a connection pattern.
Inside is a short install section using pip install dataverse-sdk, notes on OAuth with an Azure AD app registration, and advice to keep secrets in .env loaded through python-dotenv. A separate block lists common tasks: querying tables, creating and updating rows, batch operations, handling pagination and throttling. The tips section says to reuse clients rather than re-authenticating often, add retries for transient failures and log requests.
You need Python 3.10+, and the rule recommends a virtual environment. Secrets have to exist before anything runs, so check that the Azure AD app registration is in place and .env is filled in — otherwise authentication fails on the first call.
What it helps with
- connect Dataverse to a Python script over OAuth
- set environment variables for tenant and client ID
- query Dataverse tables from Python
- create and update rows in batch
- handle pagination and throttling on large reads
Example prompts for the agent
- set up a Dataverse connection with dataverse-sdk and keep secrets in .env
- show me how to authenticate over OAuth and query a table
- add retries for transient failures and request logging for Dataverse
How to install dataverse-python
Manually: put the files in place
.github/instructions/dataverse-python.instructions.mdThe applyTo field sets which files it applies to
Manually: put the files in place
.claude/rules/dataverse-python.mdThe paths frontmatter field limits the files: move applyTo from the source into paths
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.cursor/rules/dataverse-python.mdcFrontmatter: description, globs, alwaysApply. Move applyTo from the source into globs, or the rule will not attach on its own
Manually: put the files in place
.devin/rules/dataverse-python.mdManually: put the files in place
.clinerules/dataverse-python.mdStep by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use
Questions about dataverse-python
How do I install dataverse-python in GitHub Copilot?
Copy the rule file to .github/instructions/dataverse-python.instructions.md in your repository. Copilot then picks it up as chat instructions.
What does dataverse-python do?
It gives the agent a working order for the Dataverse Python SDK: install, environment variables, OAuth authentication and CRUD operations.
What do I need before using the rule?
Python 3.10+ and a virtual environment, which the rule recommends. Secrets live in .env and load through python-dotenv, and an Azure AD app registration must exist.
Source text
dataverse-python.instructions.md · MIT
--- applyTo: '**' --- # Dataverse SDK for Python — Getting Started - Install the Dataverse Python SDK and prerequisites. - Configure environment variables for Dataverse tenant, client ID, secret, and resource URL. - Use the SDK to authenticate via OAuth and perform CRUD operations. ## Setup - Python 3.10+ - Recommended: virtual environment ## Install ```bash pip install dataverse-sdk ``` ## Auth Basics - Use OAuth with Azure AD app registration. - Store secrets in `.env` and load via `python-dotenv`. ## Common Tasks - Query tables - Create/update rows - Batch operations - Handle pagination and throttling ## Tips - Reuse clients; avoid frequent re-auth. - Add retries for transient failures. - Log requests for troubleshooting.
© github · MIT · github/awesome-copilot