API wrapper and CLI for blockstream block explorer
Project description
blockstream
A python 3 wrapper class for blockstream.info's Bitcoin block explorer API
Written in Python 3
Docs: https://github.com/psqnt/blockstream/blob/master/docs.md
Block explorer: https://blockstream.info
API Reference: https://github.com/Blockstream/esplora/blob/master/API.md
Install
pip install blockstream
if not in a python3 virtualenv make sure to use python3
pip3 install blockstream
Usage
from blockstream import blockexplorer
# get transaction by id
tx_id = '56a5b477182cddb6edb460b39135a3dc785eaf7ea88a572052a761d6983e26a2'
tx = blockexplorer.get_transaction(tx_id)
# get address data
address = '3ADPkym6mQ2HyP7uASh5g3VYauhCWZpczF'
addr_info = blockexplorer.get_address(address)
Examples
Reference examples.py to see each method in use
Issues
the scripthash endpoint seems to be broken, however you can get data about a scripthash address by calling the address endpoint. I have decided to remove the functions to hit the scripthash endpoint for now.
Project details
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file blockstream-0.3.0.tar.gz.
File metadata
- Download URL: blockstream-0.3.0.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
690eabe6872b8327a639c91aff54cf39727ef96a8c4dd369982b86d71518546e
|
|
| MD5 |
8a6a48eeee7a78d58c5b322cb46276a7
|
|
| BLAKE2b-256 |
9419a0bf44e4bf566b6ff6f776e2d4d62a042975c0c02ce83f01e0aa84b0fa19
|
File details
Details for the file blockstream-0.3.0-py3-none-any.whl.
File metadata
- Download URL: blockstream-0.3.0-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
64a189611d7f5695f984611b1ffba17fa9e7e0bda8570a21692cb54ebecdf01b
|
|
| MD5 |
a824066b10fa7fb6187a42a386569e6f
|
|
| BLAKE2b-256 |
362895bed01db69c3f46c74c8661de8e04f1ea15420f2c71c3716105f7453121
|