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 (initialize → notifications/initialized → tools/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 uploadto ship to PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bdba91a51b7b47370197d577d7655c7be61905c7ee549eb137088cd02cc7da66
|
|
| MD5 |
4acae4217f500d14c94b13b10cc93400
|
|
| BLAKE2b-256 |
f0c701184f339c2af66d9c20469008cab804cffb2aa1a8eda6844b44a3a43e3c
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a172a882592f14d068556a272424d0c4ca7a283c6612a94ae3fd350e0b61cde
|
|
| MD5 |
883c011f6ea98742d3fa98a60df7e0f1
|
|
| BLAKE2b-256 |
6248eefbd9b023993db006d7ffdd601a085ec7e660cd702c725b4f1095b98ce9
|