skillfed

bittensor

A lean Python SDK (import bittensor) and CLI (btcli) for the Bittensor chain.

bittensor v11.1.0 304.9K downloads/30d#7,801 on PyPI375
Permissive license Apache-2.0 Active released

What it is and what it does

Bittensor is a thin, unopinionated wrapper around the Bittensor blockchain, exposing chain reads and transaction intents through both a Python library and a command-line tool. The SDK uses typed namespaces for chain queries (balances, subnets, neurons, delegation), supports both blocking and async patterns, and wraps mutations as serializable intents that can be previewed before execution. The CLI (`btcli`) mirrors the SDK surface: every read becomes a `query` command, every intent becomes a `tx` command, with shell completion and persistent configuration for network and wallet settings.

The package is built as a projection of the chain's own runtime metadata, so reads and intents stay synchronized with the chain without manual updates. It includes wallet management (create, regenerate, sign, verify), a Policy system to bound what mutations may do, and unit-tagged Balance types that prevent mixing currencies. The design goal is safety and transparency: nothing is hidden, every chain call is either wrapped by an intent or explicitly marked raw-only, and a CI gate ensures no operations are silently forgotten.

Use it for:

  • Query chain state (balances, subnets, neurons, delegation) from Python or the command line without building a full blockchain node.
  • Submit staking, unstaking, and transfer transactions with fee preview and policy-based safety checks before execution.
  • Build agents or tools that interact with Bittensor by dispatching reads and intents by name rather than direct method calls.
  • Manage local wallets (create, regenerate, sign messages) and verify signatures for Bittensor accounts.
  • Automate testnet or finney operations via CLI with environment-variable or config-file-based network and wallet defaults.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Bittensor is a Python SDK and CLI for interacting with the Bittensor blockchain, providing typed reads of chain state, transaction intents with safety policies, and a command-line interface for wallet and chain operations.

Yes. Bittensor is actively maintained, has low install friction, carries no known vulnerabilities, and is the canonical SDK for the Bittensor chain. Install it if you need to read chain state, submit transactions, or manage wallets on Bittensor; the CLI and library ship together, so you get both for one install.

Install

bittensor on PyPI

pip

pip install bittensor

uv

uv add bittensor

poetry

poetry add bittensor

Installing bittensor

Before you install

Low friction: pure Python wheel with seven runtime dependencies (bittensor-core, eth-account, qrcode, rich, typer, typing-extensions, websockets). Actively maintained with a release on 2026-08-14 and 375 repository stars.

License in practice

Apache-2.0 permissive license allows commercial and private use with minimal restrictions; you must include a copy of the license and state significant changes.

Quickstart

pip install bittensor

import bittensor as bt
sub = bt.Subtensor()
balance = sub.balances.get("5F...coldkey")
subnets = sub.subnets.all()

Requires Python 3.10–3.14; wallet operations require local key files or secure mnemonic input.

Verify before relying

  • Whether bittensor-core (the primary runtime dependency) is a compiled extension or pure Python.
  • Performance characteristics for high-frequency chain queries or large batch operations.
  • Compatibility with non-finney networks beyond test and local endpoints.

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (<3.15,>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 7 — bittensor-core, eth-account, qrcode, rich, typer, typing-extensions, websockets
Maintenance actively maintained — 0 days since the last release
Last repo commit
First released
Downloads 304,950/month — #7,801 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: bittensor-11.1.0-py3-none-any.whl

Tags

blockchain sdk pythonbittensor chain clientcryptocurrency wallet clichain state queriestransaction signing and submissionweb3 python librarydecentralized network client
blockchaincryptocurrencyweb3

More Internet packages