Registry / payments / pycoin

pycoin

JSON →
library0.92718.20260405pypypiunverified

Pycoin is a Bitcoin and altcoin library for address generation, key management, and transaction creation/manipulation. Current version 0.92718.20260405. Release cadence is irregular; actively maintained.

pip install pycoin
INSTALL
IMPORT
SIG · PYCOIN
P
pycoin
paymentspythonv0.92718.20260405
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

Network
from pycoin.networks import Network
from pycoin.networks import Network

Generate a Bitcoin key and print address and WIF.

from pycoin.key import Key from pycoin.networks import Network # Use Bitcoin mainnet network = Network('BTC') # Generate a random key key = Key(network=network) print(f"Public address: {key.address()}") print(f"WIF: {key.wif()}")
Debug
Known issues
breakingIn 0.9, the API was completely rewritten. Old imports from pycoin.key.PrivateKey or pycoin.key.PublicPair no longer work. Use Key class instead.
fix
Replace `from pycoin.key import PrivateKey` with `from pycoin.key import Key`.
affects: <0.9
gotchaWhen creating transactions, ensure you use Spendable objects correctly. Missing scripts or incorrect txouts can cause 'unspent not found' errors.
fix
Always provide correct scriptPubKey hex and amount for each Spendable.
affects: all
gotchaThe library defaults to Bitcoin mainnet. If you need testnet, explicitly set network='XTN' (for Bitcoin testnet) or use the Network object.
fix
Use `network = Network('XTN')` for Bitcoin testnet.
affects: all
deprecatedThe old command-line tool `ku` is deprecated in favor of `pycoin-ku`. Scripts relying on the `ku` command may break.
fix
Replace `ku` with `pycoin-ku` in shell scripts.
affects: >=0.9
Upgrade
Version history
0.92718.20260405latest on PyPI · released Apr 5, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
32 hits · last 30 days
node
30
Resources
pycoin — pip install pycoin · libregistry