py-flexpoolapi-v2
Structured Python wrapper for Flexpool.io API v2.
Installation
Install py-flexpoolapi-v2.
Using pip
pip3 install flexpoolapi-v2
Build from source
git clone https://github.com/nekusu/py-flexpoolapi-v2.git
cd py-flexpoolapi-v2
pip3 install -r requirements.txt
sudo make install # or `sudo python3 setup.py install`
Usage
Quick example:
>>> import flexpoolapi
>>> from flexpoolapi.utils import *
# Coins
>>> coins = flexpoolapi.poolapi.coins()
>>> coins[0].name
'Ethereum'
>>> coins[1].name
'Chia'
# ETH Pool
>>> eth_pool = flexpoolapi.pool("eth")
>>> format_hashrate(eth_pool.hashrate().total, "eth")
'11.2 TH/s'
>>> eth_pool.miner_count()
20600
>>> eth_pool.worker_count()
50987
# XCH Pool
>>> xch_pool = flexpoolapi.pool("xch")
>>> format_hashrate(xch_pool.hashrate().total, "xch")
'207.9 PB'
>>> xch_pool.miner_count()
3530
>>> xch_pool.worker_count()
4933
# ETH Miner
>>> eth_miner = flexpoolapi.miner("eth", eth_pool.top_miners()[0].address)
>>> format_decimals(eth_miner.balance().balance, "eth")
'1.01524 ETH'
>>> format_hashrate(eth_miner.stats().current_effective_hashrate, "eth")
'1.6 TH/s'
# XCH Miner
>>> xch_miner = flexpoolapi.miner("xch", xch_pool.top_miners()[0].address)
>>> format_decimals(xch_miner.balance().balance, "xch")
'0.1692 XCH'
>>> format_hashrate(xch_miner.stats().current_effective_hashrate, "xch")
'2.3 PB'
# Locate Address
>>> flexpoolapi.minerapi.locate_address(eth_pool.top_miners()[0].address)
'eth'
For better understanding, I recommend reading the Flexpool APIv2 documentation. All variables/functions names were renamed from camelCase to snake_case.
Undocumented endpoints added
Miner API
/miner/details(GET)/miner/payoutSettings(POST)/miner/notificationSettings(POST)
License
MIT - Copyright (c) 2020 Flexpool
Metadata
Release files for flexpoolapi-v2 2.2.4.post7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| flexpoolapi-v2-2.2.4.post7.tar.gz | 10.3 kB | Without provenance | Details for flexpoolapi-v2-2.2.4.post7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| flexpoolapi_v2-2.2.4.post7-py3-none-any.whl | Python 3 | none | any | Details for flexpoolapi_v2-2.2.4.post7-py3-none-any.whl |
Total release size: 25.2 kB
Release files / flexpoolapi-v2-2.2.4.post7.tar.gz
| Download URL | flexpoolapi-v2-2.2.4.post7.tar.gz |
|---|---|
| Size | 10.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
54776a2110faba733eeecb69f5ee7952c0a0a2bbfdca64622340374790f85182
|
|
BLAKE2b-256 checksum How to use checksums |
72ecfa2f8d807514776d65d6727edcd2fd9e625146cb098afaf934571b5ce3e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.0.1 pkginfo/1.4.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.7
|
Release files / flexpoolapi_v2-2.2.4.post7-py3-none-any.whl
| Download URL | flexpoolapi_v2-2.2.4.post7-py3-none-any.whl |
|---|---|
| Size | 14.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
14eb980f456d2343788edcb39f64249687d84ee2c47a4885148d0b54088e2c02
|
|
BLAKE2b-256 checksum How to use checksums |
7e29e9326717099283bff32ee6dfc61d71f0419713269d0294d45bc4403c666f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.0.1 pkginfo/1.4.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.7
|
Security for flexpoolapi-v2 2.2.4.post7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.