{"kind":"AgentDefinition","metadata":{"namespace":"community","name":"dataverse-python-sdk","version":"0.1.0"},"spec":{"agents_md":"---\napplyTo: '**'\n---\n# Dataverse SDK for Python — Official Quickstart\n\nThis instruction summarizes Microsoft Learn guidance for the Dataverse SDK for Python (preview) and provides copyable snippets.\n\n## Prerequisites\n- Dataverse environment with read/write\n- Python 3.10+\n- Network access to PyPI\n\n## Install\n```bash\npip install PowerPlatform-Dataverse-Client\n```\n\n## Connect\n```python\nfrom azure.identity import InteractiveBrowserCredential\nfrom PowerPlatform.Dataverse.client import DataverseClient\nfrom PowerPlatform.Dataverse.core.config import DataverseConfig\n\ncfg = DataverseConfig()  # defaults to language_code=1033\nclient = DataverseClient(\n    base_url=\"https://\u003cmyorg\u003e.crm.dynamics.com\",\n    credential=InteractiveBrowserCredential(),\n    config=cfg,\n)\n```\n- Optional HTTP settings: `cfg.http_retries`, `cfg.http_backoff`, `cfg.http_timeout`.\n\n## CRUD Examples\n```python\n# Create returns list[str] of GUIDs\naccount_id = client.create(\"account\", {\"name\": \"Acme, Inc.\", \"telephone1\": \"555-0100\"})[0]\n\n# Retrieve single\naccount = client.get(\"account\", account_id)\n\n# Update (returns None)\nclient.update(\"account\", account_id, {\"telephone1\": \"555-0199\"})\n\n# Delete\nclient.delete(\"account\", account_id)\n```\n\n## Bulk Operations\n```python\n# Broadcast patch to many IDs\nids = client.create(\"account\", [{\"name\": \"Contoso\"}, {\"name\": \"Fabrikam\"}])\nclient.update(\"account\", ids, {\"telephone1\": \"555-0200\"})\n\n# 1:1 list of patches\nclient.update(\"account\", ids, [{\"telephone1\": \"555-1200\"}, {\"telephone1\": \"555-1300\"}])\n\n# Bulk create\npayloads = [{\"name\": \"Contoso\"}, {\"name\": \"Fabrikam\"}, {\"name\": \"Northwind\"}]\nids = client.create(\"account\", payloads)\n```\n\n## File Upload\n```python\nclient.upload_file('account', record_id, 'sample_filecolumn', 'test.pdf')\nclient.upload_file('account', record_id, 'sample_filecolumn', 'test.pdf', mode='chunk', if_none_match=True)\n```\n\n## Paging Retrieve Multiple\n```python\npages = client.get(\n    \"account\",\n    select=[\"accountid\", \"name\", \"createdon\"],\n    orderby=[\"name asc\"],\n    top=10,\n    page_size=3,\n)\nfor page in pages:\n    print(len(page), page[:2])\n```\n\n## Table Metadata Quickstart\n```python\ninfo = client.create_table(\"SampleItem\", {\n    \"code\": \"string\",\n    \"count\": \"int\",\n    \"amount\": \"decimal\",\n    \"when\": \"datetime\",\n    \"active\": \"bool\",\n})\nlogical = info[\"entity_logical_name\"]\nrec_id = client.create(logical, {f\"{logical}name\": \"Sample A\"})[0]\nclient.delete(logical, rec_id)\nclient.delete_table(\"SampleItem\")\n```\n\n## References\n- Getting started: https://learn.microsoft.com/en-us/power-apps/developer/data-platform/sdk-python/get-started\n- Working with data: https://learn.microsoft.com/en-us/power-apps/developer/data-platform/sdk-python/work-data\n- SDK source/examples: https://github.com/microsoft/PowerPlatform-DataverseClient-Python\n","description":"This instruction summarizes Microsoft Learn guidance for the Dataverse SDK for Python (preview) and provides copyable snippets.","import":{"commit_sha":"541b7819d8c3545c6df122491af4fa1eae415779","imported_at":"2026-05-18T20:05:35Z","license_text":"MIT License\n\nCopyright GitHub, Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.","owner":"github","repo":"github/awesome-copilot","source_url":"https://github.com/github/awesome-copilot/blob/541b7819d8c3545c6df122491af4fa1eae415779/instructions/dataverse-python-sdk.instructions.md"},"manifest":{}},"content_hash":[0,64,75,45,172,47,42,164,44,137,195,134,221,41,30,143,65,64,221,228,105,62,185,168,101,17,100,10,132,89,158,92],"trust_level":"unsigned","yanked":false}
