Skip to main content

DC Hub Python SDK — live data-center, power & gas intelligence over MCP.

Project description

dchub — Python SDK

Live data-center, power & gas intelligence for AI agents. Hides the MCP JSON-RPC handshake (initializenotifications/initializedtools/call, SSE parsing) behind a thin client. Zero runtime dependencies (stdlib only).

Install

pip install dchub          # from this repo: pip install ./sdk/python

Quickstart (5 lines)

from dchub import DCHub
dc = DCHub()                       # reads DCHUB_API_KEY from env if set
print(dc.market("northern-virginia"))   # market intel
print(dc.search(state="VA"))            # facility search (canonical slugs)
print(dc.grid(iso="ERCOT"))             # live grid intel

API

Method Tool Returns
dc.market(slug) get_market_intel by-status counts, operators, recent facilities
dc.search(q, state, country, limit) search_facilities rows w/ canonical slug, provider, location
dc.grid(iso) get_grid_data live demand / mix / headroom
dc.call(tool, **args) any of 38 cleaned data payload
dc.tools() tools/list list of 38 tool names

Auth & tiers

Set DCHUB_API_KEY (sent as X-API-Key) for full data:

curl -X POST https://dchub.cloud/api/v1/keys/claim -d '{"client_name":"python-sdk"}'
export DCHUB_API_KEY=dch_live_...

On the free tier some fields are masked and grid returns a gated preview; the SDK strips the upsell wrapper and returns the real embedded payload either way. Source/citation: https://dchub.cloud (CC-BY-4.0).

Tests

pip install -e ".[test]" && pytest        # 5 live, gate-graceful tests

Packaging is configured but not published — the maintainer runs python -m build && twine upload to ship to PyPI.

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

dchub-0.1.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dchub-0.1.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file dchub-0.1.0.tar.gz.

File metadata

  • Download URL: dchub-0.1.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for dchub-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bdba91a51b7b47370197d577d7655c7be61905c7ee549eb137088cd02cc7da66
MD5 4acae4217f500d14c94b13b10cc93400
BLAKE2b-256 f0c701184f339c2af66d9c20469008cab804cffb2aa1a8eda6844b44a3a43e3c

See more details on using hashes here.

File details

Details for the file dchub-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: dchub-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for dchub-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4a172a882592f14d068556a272424d0c4ca7a283c6612a94ae3fd350e0b61cde
MD5 883c011f6ea98742d3fa98a60df7e0f1
BLAKE2b-256 6248eefbd9b023993db006d7ffdd601a085ec7e660cd702c725b4f1095b98ce9

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