Registry / http-networking / injective-py

injective-py

JSON →
library1.15.0pypypi✓ verified 79d ago

Official Python SDK for interacting with the Injective blockchain. Provides exchange API client, protobuf definitions, and utilities for trading, governance, staking, and more. Current version: 1.14.1. Release cadence: irregular, roughly monthly.

pip install injective-py
INSTALL
IMPORT
SIG · INJECTIVE-PY
I
injective-py
http-networkingpythonv1.15.0
Install
15.9s avg
Import
Disk
136MB
Pass rate
8/ 10
Env Coverage8 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.15.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✓ —
✓ 18.1s
py 3.11
✓ —
✓ 13.9s
py 3.12
✓ —
✓ 11.5s
py 3.13
✕ build_error
✕ build_error
py 3.9
✓ —
✓ 20.2s
136MB installed
● package 136MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Address
from pyinjective import Address
from injective.client import InjectiveClient
PrivateKey
from pyinjective import PrivateKey
Transaction
from pyinjective import Transaction

Initializes an Injective client on testnet. For authenticated operations, set a private key via environment variable.

import os from injective.client import InjectiveClient from injective.constant import Network from injective.utils.localTerra import LocalTerra # Using LocalTerra for testing, no real funds needed client = InjectiveClient( network=Network.testnet(), insecure=True, ) print("Connected to Injective testnet") # Example: get account info (requires a private key or mnemonic for authenticated actions) # private_key = os.environ.get('INJECTIVE_PRIVATE_KEY', '') # client.set_private_key(private_key) # acc = client.get_account() # print(acc)
Debug
Known issues
gotchaThe default 'insecure=True' connects via gRPC without TLS. Use only on testnet; for mainnet set 'insecure=False'.
fix
Use 'insecure=False' for mainnet and provide proper credentials.
affects: all
breakingVersion 1.14.0 bumped protobuf dependency to match Injective Core v1.19.0. Older transaction messages may be incompatible.
fix
Ensure your generated transaction types match the new proto definitions or pin to 'injective-py<1.14.0' if upgrading breaks.
affects: >=1.14.0
gotchaPython version constraint is <3.15 >=3.10. Installing on Python 3.9 or 3.15+ will fail unless using a compatible version (e.g., 1.13.1).
fix
Use Python 3.10-3.14 for v1.14+. For Python 3.9, stay on v1.13.1 (pip install injective-py==1.13.1).
affects: >=1.14.0
deprecatedThe 'LocalTerra' utility is intended for testing and may not be maintained in future releases.
fix
Consider using a testnet mnemonic and Network.testnet() instead.
affects: >=1.14.0
Upgrade
Version history
1.15.0latest on PyPI · released Jun 2, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
injective-py — pip install injective-py · libregistry