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.3.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.3-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dataverse_rest_api-0.4.3.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.3.tar.gz
Algorithm Hash digest
SHA256 01ccf13172e2070b8c4cb60762dd1d5f10e424a0f4fd0130d96b6557fc88c063
MD5 5638a651e2d9d78b735e24c92c7bd2ef
BLAKE2b-256 aba6e4e40f322e39921ad9a35e835d5b0d21b079a19f9a79352bae47437cf869

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dataverse_rest_api-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 11cca38c6ccfe4c29330fffc64c69b524d3c0411137a06e3715cb878e8698101
MD5 d88623f5587e59279763066eb5427175
BLAKE2b-256 8275368b3178393a67a06f3cf12005fa8bcf30af25e66d4cfe4d148daecea6d8

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