Skip to main content

A package used to mimic the functionality of the Dataverse SDK.

Project description

datapyrse

Overview

datapyrse is a Python library designed to mimic the functionality of the Microsoft Dataverse SDK

Features

  • Data Retrieval: Easily retrieve data from Dataverse entities.
  • Data Manipulation: Perform CRUD operations on Dataverse data.
  • Query Building: Build complex queries to filter and sort data.
  • Integration: Seamlessly integrate with other data processing libraries.

Installation

To install datapyrse, use pip:

pip install datapyrse

Usage

import uuid
from datapyrse import *
from datapyrse.query import *


service: ServiceClient = ServiceClient(
    tenant_id="YOUR_TENANT_ID",
    resource_url="YOUR_RESOURCE_URL",  # e.g. https://yourorg.crm.dynamics.com
)
if not service.IsReady:
    print("Service not ready")
    exit(1)


# Retrieve multiple entities
query: QueryExpression = QueryExpression(
    "new_tablename", ColumnSet(["new_name", "ownerid"])
)
entities: EntityCollection = service.retrieve_multiple(query)

for ent in entities.entities:
    print(f"\nId: {ent.entity_id}")
    for attribute in ent.attributes:
        print(f"  {attribute}: {ent.attributes[attribute]}")
    print()

# Retrieve a single entity
entity: Entity = service.retrieve_single("new_tablename", uuid.UUID("YOUR_GUID"))

# Create a new entity
new_entity: Entity = Entity("new_tablename")
new_entity["new_name"] = "New Entity"

user_id: uuid.UUID = uuid.UUID("USER_GUID")
new_entity["ownerid"] = EntityReference("systemuser", user_id)

service.create(new_entity)

# Delete an entity
service.delete(entity_name="new_tablename", entity_id=UUID("YOUR GUID"))
service.delete(entity_name="new_tablename", entity_id="YOUR GUID AS STRING")
service.delete(Entity("new_tablename", UUID("YOUR GUID")))
service.delete(EntityReference("new_tablename", UUID("YOUR GUID")))

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

datapyrse-0.6.0.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

datapyrse-0.6.0-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

Details for the file datapyrse-0.6.0.tar.gz.

File metadata

  • Download URL: datapyrse-0.6.0.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for datapyrse-0.6.0.tar.gz
Algorithm Hash digest
SHA256 df3529a18084720ba016dbaa092fd3f44de209f11ba6b060924dd19be02206bd
MD5 ca23c67f8714a68ec707c2b49e22a5bf
BLAKE2b-256 3fd260e14bb21141200de8fc45b51b300ebb820cd3307078dd4773f60f334c50

See more details on using hashes here.

File details

Details for the file datapyrse-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: datapyrse-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 18.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for datapyrse-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 06e0b16a9e77dadf2530d12959ddaf9ca7822c28260d36ef78fd83f28e9584e5
MD5 7a6559c28751b8c761d4dabcb1ff0d7b
BLAKE2b-256 3a6902677139608f9023e25bf28c5894b84d8e266fa81930ace1934b5c251d6c

See more details on using hashes here.

Supported by

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