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

Uploaded Python 3

File details

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

File metadata

  • Download URL: dataverse_explorer-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 6f8a9b5a540921fbd6cfdd7897e77682dae118d93d756ee745088fc27fc8ce5b
MD5 9ed32e688ca612f0345913ce00cd8ff3
BLAKE2b-256 5db232ae3998cd277607f4ddd782207ea4b27168bff33aa601839c3eb6468e81

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dataverse_explorer-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 75eeac5547c90a3fdad9024a5b5642f0cc2365a7462559cbab621712b0671485
MD5 c98ff05794ac3690f6252bb99b35132a
BLAKE2b-256 ff77868c8f9089c7be062bb4b29cb5de42d1c348e82379ebb07730d4377f2d8a

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