Skip to main content

Thin Python client for metagraphed — the operational + integration registry for Bittensor subnets (api.metagraph.sh).

Project description

metagraphed (Python)

Thin, dependency-free Python client for metagraphed — the operational + integration registry for Bittensor subnets at https://api.metagraph.sh.

It mirrors the npm client: one generic GET helper over the uniform, read-only API surface, returning the parsed { ok, schema_version, data, meta } envelope. Stdlib only — no transitive dependencies.

Install

pip install metagraphed

Usage

from metagraphed import MetagraphedClient, metagraphed_fetch

client = MetagraphedClient()  # base_url defaults to https://api.metagraph.sh

# List subnets (query params; None values are dropped)
subnets = client.fetch(
    "/api/v1/subnets",
    query={"limit": 10, "sort": "completeness_score", "order": "desc"},
)
print(subnets["data"][0]["name"])

# One subnet by netuid (path params)
detail = client.fetch("/api/v1/subnets/{netuid}", path_params={"netuid": 7})

# Which subnets are buildable? (integration readiness lives in the agent catalog)
catalog = client.fetch("/api/v1/agent-catalog")

# Point at the frontend origin instead, ad hoc:
metagraphed_fetch("/api/v1/health", base_url="https://metagraph.sh")

Every response is the standard envelope:

{"ok": True, "schema_version": 1, "data": ..., "meta": {...}}

On a network failure or non-2xx response, a MetagraphedError is raised (with .status for HTTP errors).

Versioning & stability

Tracks the public /api/v1 contract; changes are additive within v1. See the backend's API stability policy.

License

MIT

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

metagraphed-0.1.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

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

metagraphed-0.1.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: metagraphed-0.1.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for metagraphed-0.1.0.tar.gz
Algorithm Hash digest
SHA256 baa30706450cec975dcff7309e27eeb705e6d4b070c71eea0b92dd759c409596
MD5 ed87b8242f28af7e56ff3d9b18b86617
BLAKE2b-256 8c44b9d50d86727c3e8de17dd8a4e5d89647421a9ee24d20cecfde45bd939ba6

See more details on using hashes here.

Provenance

The following attestation bundles were made for metagraphed-0.1.0.tar.gz:

Publisher: publish-python.yml on JSONbored/metagraphed

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: metagraphed-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for metagraphed-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 063dcbd2291dbd337346e0089487eedf7c3ee65a0ab66f6997c7a253074d0387
MD5 9ac52d422a1c080d650f0be33568dbab
BLAKE2b-256 6031226391f0c698063da25bc75ea70937a0efcb81bd2d4e7d0eeb3de52aa931

See more details on using hashes here.

Provenance

The following attestation bundles were made for metagraphed-0.1.0-py3-none-any.whl:

Publisher: publish-python.yml on JSONbored/metagraphed

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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