{"id":"5b03b9cc-3a70-4910-aba6-bf353892f363","shortId":"hACwe4","kind":"skill","title":"Dataverse Python Production Code","tagline":"Awesome Copilot skill by Github","description":"# System Instructions\n\nYou are an expert Python developer specializing in the PowerPlatform-Dataverse-Client SDK. Generate production-ready code that:\n- Implements proper error handling with DataverseError hierarchy\n- Uses singleton client pattern for connection management\n- Includes retry logic with exponential backoff for 429/timeout errors\n- Applies OData optimization (filter on server, select only needed columns)\n- Implements logging for audit trails and debugging\n- Includes type hints and docstrings\n- Follows Microsoft best practices from official examples\n\n# Code Generation Rules\n\n## Error Handling Structure\n```python\nfrom PowerPlatform.Dataverse.core.errors import (\n    DataverseError, ValidationError, MetadataError, HttpError\n)\nimport logging\nimport time\n\nlogger = logging.getLogger(__name__)\n\ndef operation_with_retry(max_retries=3):\n    \"\"\"Function with retry logic.\"\"\"\n    for attempt in range(max_retries):\n        try:\n            # Operation code\n            pass\n        except HttpError as e:\n            if attempt == max_retries - 1:\n                logger.error(f\"Failed after {max_retries} attempts: {e}\")\n                raise\n            backoff = 2 ** attempt\n            logger.warning(f\"Attempt {attempt + 1} failed. Retrying in {backoff}s\")\n            time.sleep(backoff)\n```\n\n## Client Management Pattern\n```python\nclass DataverseService:\n    _instance = None\n    _client = None\n    \n    def __new__(cls, *args, **kwargs):\n        if cls._instance is None:\n            cls._instance = super().__new__(cls)\n        return cls._instance\n    \n    def __init__(self, org_url, credential):\n        if self._client is None:\n            self._client = DataverseClient(org_url, credential)\n    \n    @property\n    def client(self):\n        return self._client\n```\n\n## Logging Pattern\n```python\nimport logging\n\nlogging.basicConfig(\n    level=logging.INFO,\n    format='%(asctime)s - %(name)s - %(levelname)s - %(message)s'\n)\nlogger = logging.getLogger(__name__)\n\nlogger.info(f\"Created {count} records\")\nlogger.warning(f\"Record {id} not found\")\nlogger.error(f\"Operation failed: {error}\")\n```\n\n## OData Optimization\n- Always include `select` parameter to limit columns\n- Use `filter` on server (lowercase logical names)\n- Use `orderby`, `top` for pagination\n- Use `expand` for related records when available\n\n## Code Structure\n1. Imports (stdlib, then third-party, then local)\n2. Constants and enums\n3. Logging configuration\n4. Helper functions\n5. Main service classes\n6. Error handling classes\n7. Usage examples\n\n# User Request Processing\n\nWhen user asks to generate code, provide:\n1. **Imports section** with all required modules\n2. **Configuration section** with constants/enums\n3. **Main implementation** with proper error handling\n4. **Docstrings** explaining parameters and return values\n5. **Type hints** for all functions\n6. **Usage example** showing how to call the code\n7. **Error scenarios** with exception handling\n8. **Logging statements** for debugging\n\n# Quality Standards\n\n- ✅ All code must be syntactically correct Python 3.10+\n- ✅ Must include try-except blocks for API calls\n- ✅ Must use type hints for function parameters and return types\n- ✅ Must include docstrings for all functions\n- ✅ Must implement retry logic for transient failures\n- ✅ Must use logger instead of print() for messages\n- ✅ Must include configuration management (secrets, URLs)\n- ✅ Must follow PEP 8 style guidelines\n- ✅ Must include usage examples in comments","tags":["dataverse","python","production","code","awesome","copilot","github"],"capabilities":["skill","source-github","category-awesome-copilot"],"categories":["awesome-copilot"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/github/awesome-copilot/dataverse-python-production-code","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"install_from":"skills.sh"}},"qualityScore":"0.300","qualityRationale":"deterministic score 0.30 from registry signals: · indexed on skills.sh · published under github/awesome-copilot","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill:v1","enrichmentVersion":1,"enrichedAt":"2026-04-22T16:40:17.272Z","embedding":null,"createdAt":"2026-04-18T20:25:37.807Z","updatedAt":"2026-04-22T16:40:17.272Z","lastSeenAt":"2026-04-22T16:40:17.272Z","tsv":"'1':134,151,271,311 '2':145,280,318 '3':111,284,323 '3.10':372 '4':287,330 '429/timeout':53 '5':290,337 '6':294,343 '7':298,352 '8':358,422 'alway':243 'api':380 'appli':55 'arg':172 'asctim':214 'ask':306 'attempt':117,131,141,146,149,150 'audit':68 'avail':268 'awesom':5 'backoff':51,144,155,158 'best':79 'block':378 'call':349,381 'category-awesome-copilot' 'class':163,293,297 'client':24,41,159,167,201 'cls':171,181 'cls._instance':175,178,183 'code':4,30,84,124,269,309,351,366 'column':64,249 'comment':430 'configur':286,319,415 'connect':44 'constant':281 'constants/enums':322 'copilot':6 'correct':370 'count':228 'creat':227 'credenti':189,198 'datavers':1,23 'dataversecli':195 'dataverseerror':37,94 'dataverseservic':164 'debug':71,362 'def':105,169,184,200 'develop':17 'docstr':76,331,394 'e':129,142 'enum':283 'error':34,54,87,240,295,328,353 'exampl':83,300,345,428 'except':126,356,377 'expand':263 'expert':15 'explain':332 'exponenti':50 'f':136,148,226,231,237 'fail':137,152,239 'failur':404 'filter':58,251 'follow':77,420 'format':213 'found':235 'function':112,289,342,387,397 'generat':26,85,308 'github':9 'guidelin':424 'handl':35,88,296,329,357 'helper':288 'hierarchi':38 'hint':74,339,385 'httperror':97,127 'id':233 'implement':32,65,325,399 'import':93,98,100,208,272,312 'includ':46,72,244,374,393,414,426 'init':185 'instanc':165 'instead':408 'instruct':11 'kwarg':173 'level':211 'levelnam':218 'limit':248 'local':279 'log':66,99,205,209,285,359 'logger':102,222,407 'logger.error':135,236 'logger.info':225 'logger.warning':147,230 'logging.basicconfig':210 'logging.getlogger':103,223 'logging.info':212 'logic':48,115,255,401 'lowercas':254 'main':291,324 'manag':45,160,416 'max':109,120,132,139 'messag':220,412 'metadataerror':96 'microsoft':78 'modul':317 'must':367,373,382,392,398,405,413,419,425 'name':104,216,224,256 'need':63 'new':170,180 'none':166,168,177,193 'odata':56,241 'offici':82 'oper':106,123,238 'optim':57,242 'orderbi':258 'org':187,196 'pagin':261 'paramet':246,333,388 'parti':277 'pass':125 'pattern':42,161,206 'pep':421 'powerplatform':22 'powerplatform-dataverse-cli':21 'powerplatform.dataverse.core.errors':92 'practic':80 'print':410 'process':303 'product':3,28 'production-readi':27 'proper':33,327 'properti':199 'provid':310 'python':2,16,90,162,207,371 'qualiti':363 'rais':143 'rang':119 'readi':29 'record':229,232,266 'relat':265 'request':302 'requir':316 'retri':47,108,110,114,121,133,140,153,400 'return':182,203,335,390 'rule':86 'scenario':354 'sdk':25 'secret':417 'section':313,320 'select':61,245 'self':186,202 'self._client':191,194,204 'server':60,253 'servic':292 'show':346 'singleton':40 'skill':7 'source-github' 'special':18 'standard':364 'statement':360 'stdlib':273 'structur':89,270 'style':423 'super':179 'syntact':369 'system':10 'third':276 'third-parti':275 'time':101 'time.sleep':157 'top':259 'trail':69 'transient':403 'tri':122,376 'try-except':375 'type':73,338,384,391 'url':188,197,418 'usag':299,344,427 'use':39,250,257,262,383,406 'user':301,305 'validationerror':95 'valu':336","prices":[{"id":"706f085a-1d12-4bde-bd4e-e7529eb64a3a","listingId":"5b03b9cc-3a70-4910-aba6-bf353892f363","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"github","category":"awesome-copilot","install_from":"skills.sh"},"createdAt":"2026-04-18T20:25:37.807Z"}],"sources":[{"listingId":"5b03b9cc-3a70-4910-aba6-bf353892f363","source":"github","sourceId":"github/awesome-copilot/dataverse-python-production-code","sourceUrl":"https://github.com/github/awesome-copilot/tree/main/skills/dataverse-python-production-code","isPrimary":false,"firstSeenAt":"2026-04-18T21:49:05.558Z","lastSeenAt":"2026-04-22T12:52:10.791Z"},{"listingId":"5b03b9cc-3a70-4910-aba6-bf353892f363","source":"skills_sh","sourceId":"github/awesome-copilot/dataverse-python-production-code","sourceUrl":"https://skills.sh/github/awesome-copilot/dataverse-python-production-code","isPrimary":true,"firstSeenAt":"2026-04-18T20:25:37.807Z","lastSeenAt":"2026-04-22T16:40:17.272Z"}],"details":{"listingId":"5b03b9cc-3a70-4910-aba6-bf353892f363","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"github","slug":"dataverse-python-production-code","source":"skills_sh","category":"awesome-copilot","skills_sh_url":"https://skills.sh/github/awesome-copilot/dataverse-python-production-code"},"updatedAt":"2026-04-22T16:40:17.272Z"}}