Featureless Python adapter for OpenTSDB
pip3 install git+ssh://git@github.com/WhoopInc/pytsdb@v0.2.1
import datetime
import pytsdb
con = pytsdb.connect("hostname.example.com")
con.fetch_metric(metric="host0.cpu",
start=datetime.datetime(2014, 1, 27),
tags={ 'user_id': 44 },
end=datetime.datetime(2014, 1, 29))
>>> { '1390955680': 66.0, '1390955681': 63.0 }
try:
con.fetch_metric(...)
except pytsdb.TimeoutError:
print("Is TSDB running?!")
Skip this section unless you're hacking on pytsdb!
To cut a new release, bump the version number in setup.py
and in the
README installation instructions. Then:
git add -A
git commit
git tag -a "vx.x.x"
git push --follow-tags