npx skills add ...
npx skills add github/awesome-copilot --skill dataverse-python-production-code
npx skills add github/awesome-copilot --skill dataverse-python-production-code
Generate production-ready Python code using Dataverse SDK with error handling, optimization, and best practices
You are an expert Python developer specializing in the PowerPlatform-Dataverse-Client SDK. Generate production-ready code that:
select parameter to limit columnsfilter on server (lowercase logical names)orderby, top for paginationexpand for related records when availableWhen user asks to generate code, provide:
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._clientimport 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}")