dataverse-python-production-code
하는 일
이 코드는 Dataverse(마이크로소프트 데이터 서비스)와 통신하는 Python 프로그램을 만드는 데 도움을 줍니다. 모범 사례를 따라 코드가 견고하고 안전하며 효율적이도록 합니다.
사용하는 경우
- ✓Python 프로그램을 Dataverse에 연결해야 할 때.
- ✓Dataverse에서 데이터를 읽거나 쓰는 함수를 만들 때.
- ✓코드가 오류와 일시적 실패를 잘 처리하도록 하고 싶을 때.
스킬 링크
https://github.com/github/awesome-copilot/blob/main/skills/dataverse-python-production-code/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“특정 계정의 모든 연락처를 Dataverse에서 가져오는 Python 코드를 생성해 주세요. 쿼리를 최적화하고 오류 처리를 포함해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
연결을 효율적으로 관리하는 코드 패턴(싱글턴 패턴)을 사용하고, 일시적 실패에 대해 자동 재시도를 추가하며, 필요한 데이터만 선택해 성능을 높입니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
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
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
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
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
selectparameter to limit columns - Use
filteron server (lowercase logical names) - Use
orderby,topfor pagination - Use
expandfor related records when available
Code Structure
- Imports (stdlib, then third-party, then local)
- Constants and enums
- Logging configuration
- Helper functions
- Main service classes
- Error handling classes
- Usage examples
User Request Processing
When user asks to generate code, provide:
- Imports section with all required modules
- Configuration section with constants/enums
- Main implementation with proper error handling
- Docstrings explaining parameters and return values
- Type hints for all functions
- Usage example showing how to call the code
- Error scenarios with exception handling
- 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
자주 묻는 질문
'Dataverse SDK'가 무엇인가요?
프로그램이 Dataverse와 더 쉽게 상호작용하도록 도와주는 도구와 지침의 모음입니다. 데이터를 읽고, 쓰고, 관리할 수 있게 해 줍니다.
'실서비스 준비 완료'는 무엇을 뜻하나요?
실제 환경에서 사용하도록 만들어진 코드라는 뜻입니다. 이런 환경에서는 안정성, 보안, 성능이 중요합니다.
'OData 최적화'란 무엇인가요?
Dataverse에 꼭 필요한 정보만 요청해 데이터 쿼리를 더 빠르고 효율적으로 만드는 기법입니다.
상세 정보
작성자의 원본 설명
Generate production-ready Python code using Dataverse SDK with error handling, optimization, and best practices
repo: github/awesome-copilot
인기도
- GitHub 스타
- 40k
- 순위
- #7165
- 라이선스
- MIT
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
acquire-codebase-knowledge
40k에이전트가 기존 코드 프로젝트를 이해하고 문서화하도록 돕습니다. 새 구성원을 맞이하거나 아키텍처를 개괄적으로 파악할 때 유용합니다.
acreadiness-assess
40k에이전트가 프로젝트의 AI 준비 상태를 평가하고 보고서를 만들도록 합니다. 프로젝트가 AI 도구를 쓸 준비가 얼마나 되어 있는지 이해하는 데 유용합니다.
acreadiness-generate-instructions
40k에이전트가 평가 결과를 바탕으로 AI 도구를 위한 지침을 만들도록 돕습니다. AI가 코드와 상호작용하는 방식을 개선하고 확인된 공백을 메울 때 유용합니다.
acreadiness-policy
40k에이전트가 AI 프로젝트 평가를 위한 정책을 정의하거나 적용하도록 돕습니다. 프로젝트 평가 방식을 표준화하고 규정 준수를 보장할 때 유용합니다.
비슷한 스킬
api-connector-builder
280k에이전트가 기존 패턴을 따라 새로운 API 연결을 만들도록 합니다. 새로운 방식을 도입하지 않고 연동을 하나 더 추가할 때 씁니다.
api-design
280k에이전트가 모범 사례에 따라 REST API를 설계하도록 돕습니다. API가 통신하는 방식, 오류를 보여 주는 방식, 데이터를 정리하는 방식을 정하는 데 유용합니다.
backend-patterns
280k에이전트가 서버 쪽 아키텍처 패턴과 데이터베이스 최적화를 다루도록 돕습니다. 서버에서 실행되는 코드를 만들거나 검토할 때 유용합니다.