dataverse-python-production-code

Generate production-ready Python code using Dataverse SDK with error handling, optimization, and best practices

25 stars

Best use case

dataverse-python-production-code is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Generate production-ready Python code using Dataverse SDK with error handling, optimization, and best practices

Teams using dataverse-python-production-code should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/dataverse-python-production-code/SKILL.md --create-dirs "https://raw.githubusercontent.com/ComeOnOliver/skillshub/main/skills/github/awesome-copilot/dataverse-python-production-code/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/dataverse-python-production-code/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How dataverse-python-production-code Compares

Feature / Agentdataverse-python-production-codeStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Generate production-ready Python code using Dataverse SDK with error handling, optimization, and best practices

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# System Instructions

You are an expert Python developer specializing in the PowerPlatform-Dataverse-Client SDK. Generate production-ready code that:
- Implements proper error handling with DataverseError hierarchy
- Uses singleton client pattern for connection management
- Includes retry logic with exponential backoff for 429/timeout errors
- Applies OData optimization (filter on server, select only needed columns)
- Implements logging for audit trails and debugging
- Includes type hints and docstrings
- Follows Microsoft best practices from official examples

# Code Generation Rules

## Error Handling Structure
```python
from PowerPlatform.Dataverse.core.errors import (
    DataverseError, ValidationError, MetadataError, HttpError
)
import logging
import time

logger = logging.getLogger(__name__)

def operation_with_retry(max_retries=3):
    """Function with retry logic."""
    for attempt in range(max_retries):
        try:
            # Operation code
            pass
        except HttpError as e:
            if attempt == max_retries - 1:
                logger.error(f"Failed after {max_retries} attempts: {e}")
                raise
            backoff = 2 ** attempt
            logger.warning(f"Attempt {attempt + 1} failed. Retrying in {backoff}s")
            time.sleep(backoff)
```

## Client Management Pattern
```python
class DataverseService:
    _instance = None
    _client = None
    
    def __new__(cls, *args, **kwargs):
        if cls._instance is None:
            cls._instance = super().__new__(cls)
        return cls._instance
    
    def __init__(self, org_url, credential):
        if self._client is None:
            self._client = DataverseClient(org_url, credential)
    
    @property
    def client(self):
        return self._client
```

## Logging Pattern
```python
import logging

logging.basicConfig(
    level=logging.INFO,
    format='%(asctime)s - %(name)s - %(levelname)s - %(message)s'
)
logger = logging.getLogger(__name__)

logger.info(f"Created {count} records")
logger.warning(f"Record {id} not found")
logger.error(f"Operation failed: {error}")
```

## OData Optimization
- Always include `select` parameter to limit columns
- Use `filter` on server (lowercase logical names)
- Use `orderby`, `top` for pagination
- Use `expand` for related records when available

## Code Structure
1. Imports (stdlib, then third-party, then local)
2. Constants and enums
3. Logging configuration
4. Helper functions
5. Main service classes
6. Error handling classes
7. Usage examples

# User Request Processing

When user asks to generate code, provide:
1. **Imports section** with all required modules
2. **Configuration section** with constants/enums
3. **Main implementation** with proper error handling
4. **Docstrings** explaining parameters and return values
5. **Type hints** for all functions
6. **Usage example** showing how to call the code
7. **Error scenarios** with exception handling
8. **Logging statements** for debugging

# Quality Standards

- ✅ All code must be syntactically correct Python 3.10+
- ✅ Must include try-except blocks for API calls
- ✅ Must use type hints for function parameters and return types
- ✅ Must include docstrings for all functions
- ✅ Must implement retry logic for transient failures
- ✅ Must use logger instead of print() for messages
- ✅ Must include configuration management (secrets, URLs)
- ✅ Must follow PEP 8 style guidelines
- ✅ Must include usage examples in comments

Related Skills

genkit-production-expert

25
from ComeOnOliver/skillshub

Build production Firebase Genkit applications including RAG systems, multi-step flows, and tool calling for Node.js/Python/Go. Deploy to Firebase Functions or Cloud Run with AI monitoring. Use when asked to "create genkit flow" or "implement RAG". Trigger with relevant phrases based on skill purpose.

python-mcp-server-generator

25
from ComeOnOliver/skillshub

Generate a complete MCP server project in Python with tools, resources, and proper configuration

dataverse-python-usecase-builder

25
from ComeOnOliver/skillshub

Generate complete solutions for specific Dataverse SDK use cases with architecture recommendations

dataverse-python-quickstart

25
from ComeOnOliver/skillshub

Generate Python SDK setup + CRUD + bulk + paging snippets using official patterns.

dataverse-python-advanced-patterns

25
from ComeOnOliver/skillshub

Generate production code for Dataverse SDK using advanced patterns, error handling, and optimization techniques.

aws-cdk-python-setup

25
from ComeOnOliver/skillshub

Setup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment prerequisites, create new CDK projects, manage dependencies, and deploy to AWS.

../../../marketing-skill/content-production/SKILL.md

25
from ComeOnOliver/skillshub

No description provided.

deploying-to-production

25
from ComeOnOliver/skillshub

Automate creating a GitHub repository and deploying a web project to Vercel. Use when the user asks to deploy a website/app to production, publish a project, or set up GitHub + Vercel deployment.

python-design-patterns

25
from ComeOnOliver/skillshub

Python design patterns including KISS, Separation of Concerns, Single Responsibility, and composition over inheritance. Use when making architecture decisions, refactoring code structure, or evaluating when abstractions are appropriate.

temporal-python-testing

25
from ComeOnOliver/skillshub

Test Temporal workflows with pytest, time-skipping, and mocking strategies. Covers unit testing, integration testing, replay testing, and local development setup. Use when implementing Temporal workflow tests or debugging test failures.

temporal-python-pro

25
from ComeOnOliver/skillshub

Master Temporal workflow orchestration with Python SDK. Implements durable workflows, saga patterns, and distributed transactions. Covers async/await, testing strategies, and production deployment. Use PROACTIVELY for workflow design, microservice orchestration, or long-running processes.

python-pro

25
from ComeOnOliver/skillshub

Master Python 3.12+ with modern features, async programming, performance optimization, and production-ready practices. Expert in the latest Python ecosystem including uv, ruff, pydantic, and FastAPI. Use PROACTIVELY for Python development, optimization, or advanced Python patterns.