Microsoft Dynamics 365 FrameWork.
Project description
Python Microsoft Dynamic 365 FrameWork
Python Microsoft Dynamic 365 FrameWork
The Microsoft Dynamics 365 Application Programming Interface is a basic REpresentational State Transfer (REST) framework. It provides integration to Microsoft Dataverse Web API resources.
Table of Contents
Quick Start
Installation
D365API can be installed with
python -m pip install d365api
or
pip install d365api
Import the module
from D365API.D365API import D365API
Authentication
The D365API
framework allows user to authenticate the system using
OAuth. It accepts a fix list of
valid credentials to login to the system.
- hostname: the unique organization name for the environment
- client_id: the client (application) ID of the Azure registered application
- client_secret: the client secret (key) of the Azure registered application
- tenant_id: the tenant (directory) ID of the environment
# Create an instance of D365API object and login
d365api = D365API(hostname=hostname,
client_id=client_id,
client_secret=client_secret,
tenant_id=tenant_id)
Usage
Create
# Create payload
payload = {
# Account Name
'name': f'Microsoft Dynamics'
}
# Make a request to create the Account
# Get the return unique identifier (ID)
# The payload need to be serialized to JSON formatted str (json.dumps)
account_id = d365api.accounts.create(json.dumps(payload))
Read
# Make a request to read the Account
read_account = d365api.accounts.read(account_id)
Update
# Create payload
payload = {
# Account Name
'name': f'Power Platform'
}
# Make a request to update the Account with unique identifier (ID)
# Update the Account Name with the newly generated Account Name
update_account = d365api.accounts.update(account_id, json.dumps(payload))
Delete
# Make a request to delete the Account with unique identifier (ID)
delete_account = d365api.accounts.delete(account_id)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
d365fw-0.8.1.tar.gz
(21.8 kB
view hashes)
Built Distribution
d365fw-0.8.1-py2.py3-none-any.whl
(25.0 kB
view hashes)
Close
Hashes for d365fw-0.8.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f82a2d018cf5e3ddaf869edcb8b14c0f5c64f663a1d187d5ff52b25be0f383b |
|
MD5 | c8ba93b5956b9cf2dd0b7a8a9a69d27d |
|
BLAKE2b-256 | 2d6b742f39b40fc4bcf30dfcc9012430a1a0202cf18aa68e3be4bc943fb65a3f |