Bitcoin made easy.
Project description
Bit is Python’s fastest Bitcoin library and was designed from the beginning to feel intuitive, be effortless to use, and have readable source code. It is heavily inspired by Requests and Keras.
Bit is so easy to use, in fact, you can do this:
>>> from bit import Key
>>>
>>> my_key = Key(...)
>>> my_key.get_balance('usd')
'12.51'
>>>
>>> # Let's donate!
>>> outputs = [
>>> # Wikileaks
>>> ('1HB5XMLmzFVj8ALj6mfBsbifRoD4miY36v', 0.0035, 'btc'),
>>> # Internet Archive
>>> ('1Archive1n2C579dMsAu3iC6tWzuQJz8dN', 190, 'jpy'),
>>> # The Pirate Bay
>>> ('129TQVAroeehD9fZpzK51NdZGQT4TqifbG', 3, 'eur'),
>>> # xkcd
>>> ('14Tr4HaKkKuC1Lmpr2YMAuYVZRWqAdRTcr', 2.5, 'cad')
>>> ]
>>>
>>> my_key.send(outputs)
'9f59f5c6757ec46fdc7440acbeb3920e614c8d1d247ac174eb6781b832710c1c'
Here is the transaction https://blockchain.info/tx/9f59f5c6757ec46fdc7440acbeb3920e614c8d1d247ac174eb6781b832710c1c.
Features
Python’s fastest available implementation (100x faster than closest library)
Seamless integration with existing server setups
Supports keys in cold storage
Fully supports 25 different currencies
First class support for storing data in the blockchain
Deterministic signatures via RFC 6979
Access to the blockchain (and testnet chain) through multiple APIs for redundancy
Exchange rate API, with optional caching
Optimal transaction fee API, with optional caching
Compressed public keys by default
Multiple representations of private keys; WIF, PEM, DER, etc.
Legacy P2PKH and Segwit nested-P2WPKH transactions
Legacy P2SH and Segwit nested-P2WSH transactions
If you are intrigued, continue reading. If not, continue all the same!
Installation
Bit is distributed on PyPI as a universal wheel and is available on Linux/macOS and Windows and supports Python 3.5+ and PyPy3.5-v5.7.1+. pip >= 8.1.2 is required.
$ pip install bit
Documentation
Docs are hosted by Github Pages and are automatically built and published by Travis after every successful commit to Bit’s master branch.
Credits
Logo courtesy of https://textcraft.net
Gregory Maxwell (Bitcoin core dev) for teaching me a bit of ECC math
arubi in #bitcoin for helping me understand transaction gotchas
fuzeman for bestowing me the name bit on the Python Package Index
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
File details
Details for the file bit-JCO-0.8.1.tar.gz
.
File metadata
- Download URL: bit-JCO-0.8.1.tar.gz
- Upload date:
- Size: 63.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7ab2afe4f68d88a53aeb6a2e25542d90f0a372d468e2d1d2a941a4f8df77f53 |
|
MD5 | b3fda2ea8b06ac3be3a48c418bc56a91 |
|
BLAKE2b-256 | 32fe68aaf1c702032010978e6cd6f08ca8b56004b3b7ae5f97d0730c75e6e4ce |
File details
Details for the file bit_JCO-0.8.1-py3-none-any.whl
.
File metadata
- Download URL: bit_JCO-0.8.1-py3-none-any.whl
- Upload date:
- Size: 69.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2491a4a103761fd5db1361c04e5d2ab015101c1481992382c1fdbd110201a28 |
|
MD5 | 2d745bfccd683d80f5c61f6e31c31ddc |
|
BLAKE2b-256 | 5493ede5ab4f977ee9c3314ddceebb9451785461bbbfb43718ed0d2f17f0c30a |