MR
Mayur Rathi
@github
⭐ 34.1k GitHub stars

Dataverse-Python-Modules

Dataverse-Python-Modules是一款code方向的AI技能,核心价值是# Dataverse SDK for Python — Complete Module Reference ## Package Hierarchy ``` PowerPlatform,可用于解决开发者在code领域的实际问题,帮助用户提升效率、自动化重复任务或优化工作流。

# Dataverse SDK for Python — Complete Module Reference ## Package Hierarchy ``` PowerPlatform.Dataverse ├── client │ └── DataverseClient ├── core │ ├── config (DataverseConfig) │ └── errors (D

Last verified on: 2026-05-30
mkdir -p ./skills/dataverse-python-modules && curl -sfL https://raw.githubusercontent.com/github/awesome-copilot/main/skills/dataverse-python-modules/SKILL.md -o ./skills/dataverse-python-modules/SKILL.md

Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).

Skill Content

# Dataverse SDK for Python — Complete Module Reference


Package Hierarchy


text
PowerPlatform.Dataverse
├── client
│   └── DataverseClient
├── core
│   ├── config (DataverseConfig)
│   └── errors (DataverseError, ValidationError, MetadataError, HttpError, SQLParseError)
├── data (OData operations, metadata, SQL, file upload)
├── extensions (placeholder for future extensions)
├── models (placeholder for data models and types)
└── utils (placeholder for utilities and adapters)

core.config Module


Manage client connection and behavior settings.


DataverseConfig Class


Container for language, timeouts, retries. Immutable.


python
from PowerPlatform.Dataverse.core.config import DataverseConfig

cfg = DataverseConfig(
    language_code=1033,        # Default English (US)
    http_retries=None,         # Reserved for future
    http_backoff=None,         # Reserved for future
    http_timeout=None          # Reserved for future
)

# Or use default static builder
cfg_default = DataverseConfig.from_env()

**Key attributes:**

- `language_code: int = 1033` — LCID for localized labels and messages.

- `http_retries: int | None` — (Reserved) Maximum retry attempts for transient errors.

- `http_backoff: float | None` — (Reserved) Backoff multiplier between retries.

- `http_timeout: float | None` — (Reserved) Request timeout in seconds.


core.errors Module


Structured exception hierarchy for SDK operations.


DataverseError (Base)


Base exception for SDK errors.


python
from PowerPlatform.Dataverse.core.errors import DataverseError

try:
    # SDK call
    pass
except DataverseError as e:
    print(f"Code: {e.code}")                # Error category
    print(f"Subcode: {e.subcode}")          # Specific error
    print(f"Message: {e.message}")          # Human-readable
    print(f"Status: {e.status_code}")       # HTTP status (if applicable)
    print(f"Transient: {e.is_transient}")   # Retry-worthy?
    details = e.to_dict()                  # Convert to dict

ValidationError


Validation failures during data operations.


python
from PowerPlatform.Dataverse.core.errors import ValidationError

MetadataError


Table/column creation, deletion, or inspection failures.


python
from PowerPlatform.Dataverse.core.errors import MetadataError

try:
    client.create_table("MyTable", {...})
except MetadataError as e:
    print(f"Metadata issue: {e.message}")

HttpError


Web API HTTP request failures (4xx, 5xx, etc.).


python
from PowerPlatform.Dataverse.core.errors import HttpError

try:
    client.get("account", record_id)
except HttpError as e:
    print(f"HTTP {e.status_code}: {e.message}")
    print(f"Service error code: {e.service_error_code}")
    print(f"Correlation ID: {e.correlation_id}")
    print(f"Request ID: {e.request_id}")
    print(f"Retry-After: {e.retry_after} seconds")
    print(f"Transient (retry?): {e.is_transient}")  # 429, 503, 504

SQLParseError


SQL query syntax errors when using `query_sql()`.


python
from PowerPlatform.Dataverse.core.errors import SQLParseError

try:
    client.query_sql("INVALID SQL HERE")
except SQLParseError as e:
    print(f"SQL parse error: {e.message}")

data Package


Low-level OData protocol, metadata, SQL, and file operations (internal delegation).


The `data` package is primarily internal; the high-level `DataverseClient` in the `client` module wraps and exposes:

- CRUD operations via OData

- Metadata management (create/update/delete tables and columns)

- SQL query execution

- File upload handling


Users interact with these via `DataverseClient` methods (e.g., `create()`, `get()`, `update()`, `delete()`, `create_table()`, `query_sql()`, `upload_file()`).


extensions Package (Placeholder)


Reserved for future extension points (e.g., custom adapters, middleware).


Currently empty; use core and client modules for current functionality.


models Package (Placeholder)


Reserved for future data model definitions and type def

🎯 Best For

  • Claude users
  • GitHub Copilot users
  • Software engineers
  • Development teams
  • Tech leads

💡 Use Cases

  • Python code quality enforcement
  • Dependency management

📖 How to Use This Skill

  1. 1

    Install the Skill

    Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.

  2. 2

    Load into Your AI Assistant

    Open Claude or GitHub Copilot and reference the skill. Paste the SKILL.md content or use the system prompt tab.

  3. 3

    Apply Dataverse-Python-Modules to Your Work

    Open your project in the AI assistant and ask it to apply the skill. Start with a small module to verify the output quality.

  4. 4

    Review and Refine

    Review AI suggestions before committing. Run tests, check for regressions, and iterate on the skill output.

❓ Frequently Asked Questions

Is Dataverse-Python-Modules compatible with Cursor and VS Code?

Yes — this skill works with any AI coding assistant including Cursor, VS Code with Copilot, and JetBrains IDEs.

Do I need specific dependencies for Dataverse-Python-Modules?

Check the install command and Works With section. Most code skills only require the AI assistant and your codebase.

How do I install Dataverse-Python-Modules?

Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/dataverse-python-modules/SKILL.md, ready to use.

Can I customize this skill for my team?

Absolutely. Edit the SKILL.md file to add team-specific instructions, examples, or workflows.

⚠️ Common Mistakes to Avoid

Skipping validation

Always test AI-generated code changes, even for simple refactors.

Missing dependency updates

Check if the skill requires updated dependencies or new packages.

🔗 Related Skills