Skip to main content

Lightweight Python client for connecting to the Dataverse REST API.

Project description

A lightweight Python client for connecting to the Dataverse (Dynamics 365) REST API with no-fuss browser based login.

Installation

pip install dataverse-rest-api

Usage

from dataverse_rest_api import DataverseClient

client = DataverseClient("https://yourorg.crm.dynamics.com")

client.authenticate()

# Query top 5 contacts
contacts = client.query("contacts", odata="$top=5")
print(contacts)

# Create a new contact
new_contact_id = client.create(
    "contacts", 
    {"firstname": "Sam", "lastname": "Smith"}
)
print(new_contact_id)

# Update that contact
client.patch_record(
    "contacts", 
    new_contact_id,
    {"jobtitle": "Software Engineer"}
)

# Delete the contact
client.delete_record("contacts", new_contact_id)

# Or send a fully custom request
resp = client.send_request(
    method="POST",
    endpoint="api/data/v9.2/tle_mycustomapi",
    data={}
)
print(resp.json())

# Reset the client and clear any cached access tokens 
client.reset() 

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dataverse_rest_api-0.4.5.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dataverse_rest_api-0.4.5-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file dataverse_rest_api-0.4.5.tar.gz.

File metadata

  • Download URL: dataverse_rest_api-0.4.5.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for dataverse_rest_api-0.4.5.tar.gz
Algorithm Hash digest
SHA256 13040d7128f125b437cbfbee7222a60125aff7e74ef5199abc6d337644676d3c
MD5 5fc6300ae9108e58bc5ddc5a701bd403
BLAKE2b-256 e504b36065533212d7ddc32f9efaa504f129afb0e4f83561e24caed11e02c838

See more details on using hashes here.

File details

Details for the file dataverse_rest_api-0.4.5-py3-none-any.whl.

File metadata

File hashes

Hashes for dataverse_rest_api-0.4.5-py3-none-any.whl
Algorithm Hash digest
SHA256 892f250254fc618d6879c5aa39bf36a9bcd5d3058cd3a6a05039746981c6bf6e
MD5 b2eccf981e01dcffdf971bf7e31ee245
BLAKE2b-256 99c401834cad567c03edfc77244c42a88b179f391c64e91997dc572f80cf205b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page