Skip to main content

Python CLI for querying Microsoft Dataverse API with SQL-like syntax

Project description

Dataverse Explorer

Python CLI for querying the Dataverse API and exploring datasets. Give Cursor or your AI IDE the abiltity to run read/list queries via terminal rather than browsing the data via the slow web interface.

Features

Auto-Discovery: Automatically detects tenant ID and Dataverse URL from Azure/PAC CLI ✅ SQL Queries: Write familiar SQL syntax - automatically translated to OData ✅ OAuth Device Code Flow: Secure authentication with automatic token caching ✅ Multiple Output Formats: Table, JSON, or CSV output ✅ CloudFlare WARP Compatible: SSL verification disabled by default ✅ Interactive Graph Visualization: Cytoscape.js-powered HTML reports

Prerequisites

  • Python 3.11+
  • Power Platform CLI.
    • It's easier if you install .NET via the installer here.
    • Then you can run dotnet tool install --global Microsoft.PowerApps.CLI.Tool to install the Power Platform CLI.
  • Azure CLI (az command - you can install with brew install azure-cli on MacOS)
  • Login to Azure CLI with az login

Cheat sheet

Setup:

make setup-env
source venv/bin/activate

./main.py --help
# This will open up a web browser for authentication and save your configuration in .env
./main.py configure

Listing Tables

# This will list the tables you have access to.
./main.py list-tables
# filter by tables matching 'account'
./main.py list-tables --filter account

Querying Data

  • Run a SQL query against a specific table:
# Clean output (smart filtering of columns to reduce noise)
./main.py query "SELECT * FROM connectionreferences LIMIT 10"

# Further reduce noise by specifying the exact column
./main.py query "SELECT name FROM account" --quiet

# Show all columns including metadata
./main.py query "SELECT * FROM connectionreferences LIMIT 10" --all-columns

# Output as JSON
./main.py query "SELECT * FROM account" --format json | jq

# Output as JSON and pipe into jq
./main.py query "SELECT * FROM account LIMIT 5" --json | jq '.value[].name'

# CSV for spreadsheets
./main.py query "SELECT name FROM account" --format csv > output.csv

Dumping and Visualizing Data

# This will dump all data from the dataverse for offline analysis and graph visualization
./main.py dump-dataverse

# This will visualize the dumped dataverse data as a graph, explorable via Cytoscape.
./main.py visualize-graph --input dumped_dataverse.json --output graph.html

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_explorer-1.0.0.tar.gz (35.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_explorer-1.0.0-py3-none-any.whl (39.8 kB view details)

Uploaded Python 3

File details

Details for the file dataverse_explorer-1.0.0.tar.gz.

File metadata

  • Download URL: dataverse_explorer-1.0.0.tar.gz
  • Upload date:
  • Size: 35.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for dataverse_explorer-1.0.0.tar.gz
Algorithm Hash digest
SHA256 b06cec3d6af42e81204c99605de685277f8207a884acb1376f5076ac66240619
MD5 d8697444b2a352c12ffb561c08c0bb40
BLAKE2b-256 7ff6cd57bd1d12ea3fd97c66618a28136362b5e30665f499c042635408a93858

See more details on using hashes here.

File details

Details for the file dataverse_explorer-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for dataverse_explorer-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7aee089e954de95f7ada85d4bf3c1b197b2c08de91c929757f9801b4d970c37b
MD5 6a79691554273bb52c0a494d229dec8c
BLAKE2b-256 aa7ab925f871de17b0e16de7d93aa416112ba8422a045e8a6e0a3a4836c88a51

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