holgern / pymempool

About Python Package for Mempool.Space API.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mempool.space API wrapper

codecov PyPi Version

Python3 wrapper around the mempool.space API (V1)

Installation

PyPI

pip install pymempool

or from source

git clone https://github.com/holgern/pymempool.git
cd pymempool
python3 setup.py install

Usage

from pymempool import MempoolAPI
mp = MempoolAPI()

API Documentation

https://mempool.space/docs/api/rest

Test Suite

Set up the test environment

Install the test-runner dependencies:

pip3 install -r requirements-test.txt

Then make the pymempool python module visible/importable to the tests by installing the local dev dir as an editable module:

# from the repo root
pip3 install -e .

Running the test suite

Run the whole test suite:

# from the repo root
pytest

Run a specific test file:

pytest test/test_this_file.py

Run a specific test:

pytest test/test_this_file.py::test_this_specific_test

Running tests with tox

Install tox

pip install tox

Run tests

tox

License

MIT

Pre-commit-config

Installation

$ pip install pre-commit

Using homebrew:

$ brew install pre-commit
$ pre-commit --version
pre-commit 2.10.0

Install the git hook scripts

$ pre-commit install

Run against all the files

pre-commit run --all-files
pre-commit run --show-diff-on-failure --color=always --all-files

Update package rev in pre-commit yaml

pre-commit autoupdate
pre-commit run --show-diff-on-failure --color=always --all-files

About

About Python Package for Mempool.Space API.

License:MIT License


Languages

Language:Python 100.0%