This project has been archived by its maintainers, and is no longer receiving any updates.
prometheus coin scraper : A simple metric provider for prometheus
This provide a set of metric for all cryptocurencies listed on https://coin360.com/ and http://coinmarketcap.com/
A lot of values are generated from this scrapper ~10000 values today (27/12/2018)
How to use
Install the pip package
pip install prometheus_coin_scraper
to start the metric server that will serve all metrics you can use the following command
python -m prometheus_coin_scraper [webport]
In-code usage
This module is also usable inside you code and will produce very simple webserver that is by default reachable on http://localhost:8000/ and displays all metrics in a prometheus compatible format
from prometheus_coin_scraper.PrometheusClient import PrometheusClient
PrometheusClient(port=8000)
This class start and run the web server. As it is a blocking call you might need to start it in a Thread
from prometheus_coin_scraper.PrometheusClient import PrometheusClient
from threading import Thread
def func():
PrometheusClient(port=8000)
Thread(target=func).start()
Information on collected Metrics
-
coin_scrapper_fetch_time: The time spent fetching all currencies values -
coin_scrapper_gauge_update_time: The time spent updating all prometheus Gauges values -
coin_scrapper_last_update: Last update time -
coin_scrapper_currencies_number: The current number currencies in the Index -
coin_scrapper_coin_value_usd: Coin value in USDThere are three labels
symbol: The currency symbol (BTC, LTC, XRP, ...)name: The currency name (Bitcoin, Litecoin, Ripple, ...)source: The name of the source for the currency value (coin360.com, ...)
-
coin_scrapper_coin_value_btc: Coin value in BTCThere are three labels
symbol: The currency symbol (BTC, LTC, XRP, ...)name: The currency name (Bitcoin, Litecoin, Ripple, ...)source: The name of the source for the currency value (coin360.com, ...)
-
coin_scrapper_coin_last_platform_updateLast update of the coin on the sourceThere are three labels
symbol: The currency symbol (BTC, LTC, XRP, ...)name: The currency name (Bitcoin, Litecoin, Ripple, ...)source: The name of the source for the currency value (coin360.com, ...)
-
coin_scrapper_coin_changes: Calculated changes of the coin over time (1h, 24h, 7d)There are three labels
symbol: The currency symbol (BTC, LTC, XRP, ...)name: The currency name (Bitcoin, Litecoin, Ripple, ...)source: The name of the source for the currency value (coin360.com, ...)interval: The interval for the calculated value (1h, 24h or 7d)
Metadata
Release files for prometheus-coin-scrapper 0.0.2
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 | |
|---|---|---|---|---|
| prometheus_coin_scrapper-0.0.2.tar.gz | 4.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| prometheus_coin_scrapper-0.0.2-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 9.1 kB
Release files / prometheus_coin_scrapper-0.0.2.tar.gz
| Download URL | prometheus_coin_scrapper-0.0.2.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8159571939a0b663743a4b9a0316490711a9e0453865e87a5d1a2a1a5a3a9e03
|
|
BLAKE2b-256 checksum How to use checksums |
cade5961bf784bc5686f4e5ad071bb87f6671dbd83cbfb72850626bb8127fdf0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.14
|
Release files / prometheus_coin_scrapper-0.0.2-py2.py3-none-any.whl
| Download URL | prometheus_coin_scrapper-0.0.2-py2.py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
39e5b104f65cb70c9dc6e814298fd7a581d7e0e0b2793c49878011348d25667e
|
|
BLAKE2b-256 checksum How to use checksums |
2641f0f8a6eded3b00638b754e13847ea5e5c09510acc3ebb1452770033f1c1c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.14
|
Security for prometheus-coin-scrapper 0.0.2
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.