Name | pymempool JSON |
Version |
0.2.0
JSON |
| download |
home_page | None |
Summary | Python Api for mempool.space |
upload_time | 2025-07-23 21:36:55 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >3.8.0 |
license | MIT License
Copyright (c) 2022 Holger Nahrstaedt
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
|
keywords |
mempool
btc
|
VCS |
 |
bugtrack_url |
|
requirements |
urllib3
requests
rich
typer
|
Travis-CI |
No Travis.
|
coveralls test coverage |
|
# mempool.space API wrapper
[](https://codecov.io/gh/holgern/pymempool)
[](https://pypi.python.org/pypi/pymempool/)
Python3 wrapper around the [mempool.space](https://www.mempool.space) API (V1)
### Installation
PyPI
```bash
pip install pymempool
```
or from source
```bash
git clone https://github.com/holgern/pymempool.git
cd pymempool
python3 setup.py install
```
### Usage
```python
from pymempool import MempoolAPI
mp = MempoolAPI()
```
### CLI Commands
The package provides a command-line interface with various commands to interact with the mempool.space API.
```bash
# Display recent Bitcoin blocks as ASCII art with statistics
pymempool blocks --limit 5
# Display mempool blocks as ASCII art with statistics
pymempool mempool-blocks
# Get information about the next Bitcoin halving
pymempool halving
# Get current mempool information
pymempool mempool
# Get current fee recommendations
pymempool fees
# Get details about a specific Bitcoin address
pymempool address <address>
# Get details about a specific block
pymempool block <block_hash>
# Stream live Bitcoin data from the WebSocket API
pymempool stream
```
For more details on any command, use the `--help` option:
```bash
pymempool blocks --help
```
### 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](https://choosealicense.com/licenses/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
```bash
pre-commit autoupdate
pre-commit run --show-diff-on-failure --color=always --all-files
```
Raw data
{
"_id": null,
"home_page": null,
"name": "pymempool",
"maintainer": null,
"docs_url": null,
"requires_python": ">3.8.0",
"maintainer_email": null,
"keywords": "mempool, btc",
"author": null,
"author_email": "Holger Nahrstaedt <nahrstaedt@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/13/f7/e84b8c7c63529eb804cdd247e2128df6bacc3db73e9521556a05e76f36a2/pymempool-0.2.0.tar.gz",
"platform": null,
"description": "# mempool.space API wrapper\n\n[](https://codecov.io/gh/holgern/pymempool)\n[](https://pypi.python.org/pypi/pymempool/)\n\nPython3 wrapper around the [mempool.space](https://www.mempool.space) API (V1)\n\n### Installation\n\nPyPI\n\n```bash\npip install pymempool\n```\n\nor from source\n\n```bash\ngit clone https://github.com/holgern/pymempool.git\ncd pymempool\npython3 setup.py install\n```\n\n### Usage\n\n```python\nfrom pymempool import MempoolAPI\nmp = MempoolAPI()\n```\n\n### CLI Commands\n\nThe package provides a command-line interface with various commands to interact with the mempool.space API.\n\n```bash\n# Display recent Bitcoin blocks as ASCII art with statistics\npymempool blocks --limit 5\n\n# Display mempool blocks as ASCII art with statistics\npymempool mempool-blocks\n\n# Get information about the next Bitcoin halving\npymempool halving\n\n# Get current mempool information\npymempool mempool\n\n# Get current fee recommendations\npymempool fees\n\n# Get details about a specific Bitcoin address\npymempool address <address>\n\n# Get details about a specific block\npymempool block <block_hash>\n\n# Stream live Bitcoin data from the WebSocket API\npymempool stream\n```\n\nFor more details on any command, use the `--help` option:\n\n```bash\npymempool blocks --help\n```\n\n### API Documentation\n\nhttps://mempool.space/docs/api/rest\n\n## Test Suite\n\n### Set up the test environment\n\nInstall the test-runner dependencies:\n\n```\npip3 install -r requirements-test.txt\n```\n\nThen make the `pymempool` python module visible/importable to the tests by installing the local dev dir as an editable module:\n\n```\n# from the repo root\npip3 install -e .\n```\n\n### Running the test suite\n\nRun the whole test suite:\n\n```\n# from the repo root\npytest\n```\n\nRun a specific test file:\n\n```\npytest test/test_this_file.py\n```\n\nRun a specific test:\n\n```\npytest test/test_this_file.py::test_this_specific_test\n```\n\n### Running tests with tox\n\nInstall tox\n\n```\npip install tox\n```\n\nRun tests\n\n```\ntox\n```\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n\n## Pre-commit-config\n\n### Installation\n\n```\n$ pip install pre-commit\n```\n\n### Using homebrew:\n\n```\n$ brew install pre-commit\n```\n\n```\n$ pre-commit --version\npre-commit 2.10.0\n```\n\n### Install the git hook scripts\n\n```\n$ pre-commit install\n```\n\n### Run against all the files\n\n```\npre-commit run --all-files\npre-commit run --show-diff-on-failure --color=always --all-files\n```\n\n### Update package rev in pre-commit yaml\n\n```bash\npre-commit autoupdate\npre-commit run --show-diff-on-failure --color=always --all-files\n```\n",
"bugtrack_url": null,
"license": "MIT License\n \n Copyright (c) 2022 Holger Nahrstaedt\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n ",
"summary": "Python Api for mempool.space",
"version": "0.2.0",
"project_urls": {
"Homepage": "https://github.com/holgern/pymempool"
},
"split_keywords": [
"mempool",
" btc"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "7a4125f402495317d3adc4fc93fe6ad36dde1483abd269dbc97b32ee5ae45705",
"md5": "b8445c301d6fe0f83303f7e6accc4c03",
"sha256": "72f867876865551384aea5f704883bb9921c7871c81996f3eec4f0ce185a9aa4"
},
"downloads": -1,
"filename": "pymempool-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b8445c301d6fe0f83303f7e6accc4c03",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">3.8.0",
"size": 26064,
"upload_time": "2025-07-23T21:36:54",
"upload_time_iso_8601": "2025-07-23T21:36:54.977453Z",
"url": "https://files.pythonhosted.org/packages/7a/41/25f402495317d3adc4fc93fe6ad36dde1483abd269dbc97b32ee5ae45705/pymempool-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "13f7e84b8c7c63529eb804cdd247e2128df6bacc3db73e9521556a05e76f36a2",
"md5": "65501060b901a86d241b8489c64e932d",
"sha256": "7ba33587b4608a9add5a887a85dd315e1a0579f791f734dc86f7abcac4ddb426"
},
"downloads": -1,
"filename": "pymempool-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "65501060b901a86d241b8489c64e932d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">3.8.0",
"size": 35398,
"upload_time": "2025-07-23T21:36:55",
"upload_time_iso_8601": "2025-07-23T21:36:55.778465Z",
"url": "https://files.pythonhosted.org/packages/13/f7/e84b8c7c63529eb804cdd247e2128df6bacc3db73e9521556a05e76f36a2/pymempool-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-23 21:36:55",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "holgern",
"github_project": "pymempool",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"circle": true,
"requirements": [
{
"name": "urllib3",
"specs": []
},
{
"name": "requests",
"specs": []
},
{
"name": "rich",
"specs": []
},
{
"name": "typer",
"specs": []
}
],
"lcname": "pymempool"
}