A simple prometheus scrapper that provide many information about cryptocurrencies values in "realtime"
Project description
prometheus coin360 scraper : A simple metric provider for prometheus
This provide a set of metric for all cryptocurencies listed on coin360.com and coinmarket caps
A lot of metrics 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_update
Last 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)
Project details
Release history Release notifications | RSS feed
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
Hashes for prometheus_coin_scrapper-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4929075550517c859c368889673c162b6300d080af85bb260301be5a25f26c0 |
|
MD5 | 17ed15baa5d12d07177f150adf4f3ce0 |
|
BLAKE2b-256 | 23f700013dbd968c7bfb7b9724b28fbdd735d582c946721c9acd6904a29992e5 |
Hashes for prometheus_coin_scrapper-0.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb38c2bbf490f5cbaaeeca0e63afac7ca6b59ab68cf2eaaf83ce73d0ae98eb61 |
|
MD5 | ce3c662100b4ef9a71c0afffdf38f8c0 |
|
BLAKE2b-256 | 70041e2c6881d6fc4581df203fd974a7589f4dea0473555ae71325a21c5af859 |