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.core import *
from datapyrse.core.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.5.2.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

datapyrse-0.5.2-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for datapyrse-0.5.2.tar.gz
Algorithm Hash digest
SHA256 2e484d4b357f959997631416d4c054cbe00f05a500d45bfb4d04f7b518647e2d
MD5 b022056855c1d3a7eba1701f6d75af24
BLAKE2b-256 398bf4184ef35c102b346e793ba2d3fc96025ad07d9490de94390ec413d4b9b0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: datapyrse-0.5.2-py3-none-any.whl
  • Upload date:
  • Size: 4.2 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.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0eba73ddd7503805f87962fa96740035a26c62f84ad9c12759c03274f33b05a9
MD5 f32234c72787f9d9188a918bd83edcdf
BLAKE2b-256 7bda43f8f118d02bfd91a8561532e69b2109976791a4f9e5b205af6aa14d9db1

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