Registry / crm-productivity / dynamics365crm-python

dynamics365crm-python

JSON →
library1.0.2pypypi✓ verified 79d ago

An API wrapper for Microsoft Dynamics 365 CRM that provides Python bindings for CRM operations. Current version 1.0.2 supports Python 3.7-3.11. The library is stable with no recent updates; it wraps OData REST endpoints for entity CRUD and batch operations.

pip install dynamics365crm-python
INSTALL
IMPORT
SIG · DYNAMICS365CRM-PYT
D
dynamics365crm-python
crm-productivitypythonv1.0.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Dynamics365Client
import dynamics365crm
from dynamics365crm import Dynamics365Client

Initialize client with Azure AD auth and create a new contact entity.

from dynamics365crm import Dynamics365Client import os client = Dynamics365Client( client_id=os.environ.get('CLIENT_ID', ''), client_secret=os.environ.get('CLIENT_SECRET', ''), tenant_id=os.environ.get('TENANT_ID', ''), resource_url=os.environ.get('CRM_URL', '') ) # Create a contact contact = client.create('contacts', {'fullname': 'John Doe', 'emailaddress1': 'john@example.com'}) print('Created contact:', contact.id)
Debug
Known issues
breakingIn version 1.0.0, the constructor changed from positional arguments to keyword-only arguments for client_id, client_secret, etc. Older code using positional args will break.
fix
Update calls to use keyword arguments: Dynamics365Client(client_id='...', client_secret='...')
affects: >=1.0.0
deprecatedThe 'create', 'update', 'delete' methods still expect entity data as a list of dictionaries for batch operations, but the non-batch methods are preferred. Batch methods may be removed in a future release.
fix
Use single entity methods for single operations: client.create(entity_name, data)
affects: all
gotchaThe resource_url must not include a trailing slash. Many users include '/api/data/v9.1/' which is default, but mistakenly add a slash at the end, causing 404 errors.
fix
Ensure resource_url ends without a slash, e.g., 'https://org.crm.dynamics.com/api/data/v9.1'
affects: all
Upgrade
Version history
1.0.2latest on PyPI · released Apr 24, 2023
Audit
Dependencies
requestsrequiredHTTP client for API calls
msaloptionalAzure AD authentication
Agent activity
36 hits · last 30 days
node
32
OpenAI (training)
1
Resources
dynamics365crm-python — pip install dynamics365crm-python · libregistry