Skip to main content
https://img.shields.io/pypi/v/bit.svg?style=flat-square https://img.shields.io/travis/ofek/bit.svg?branch=master&style=flat-square https://img.shields.io/codecov/c/github/ofek/bit.svg?style=flat-square https://img.shields.io/pypi/pyversions/bit.svg?style=flat-square https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square

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

Metadata

Release files for bit 0.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bit 0.8.0
File Size Uploaded
bit-0.8.0.tar.gz 62.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bit 0.8.0
File Interpreter ABI Platform
bit-0.8.0-py3-none-any.whl Python 3 none any Details

Total release size: 131.8 kB

Release files / bit-0.8.0.tar.gz

Download URL bit-0.8.0.tar.gz
Size 62.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6590d7cebcc684b276b86aeb8b28986d78f81355a2edfa4eba96368e76bd6501
BLAKE2b-256 checksum
How to use checksums
78e31878e17384140874bf1d7baef614009b7d32c0026675aec4f0a8db13cadf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.25.1 setuptools/47.3.0 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.1

Release files / bit-0.8.0-py3-none-any.whl

Download URL bit-0.8.0-py3-none-any.whl
Size 68.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
059b4f8905359576ecb09c7bc9e5e266532b820179c625e39a501a21867f2c83
BLAKE2b-256 checksum
How to use checksums
3d3a188818b767afc4ebad66c3bd30205fdea137d6c7dd73a4767dc00dd12fbf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.18.1

Release history Release notifications | RSS feed

This release

0.8.0 This release

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

1 release file

0.3.1

1 release file

0.2.0

1 release file

0.1.0

1 release file

0.0.1

1 release file

0.0.0

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page