es_simple
A package for query ElasticSearch and parse response easy.
Usage
import es_simple
import time
qb = es_simple.QueryBuilder("hostname:*live*", # query string
int(time.time() * 1000 - 3600 * 1000), "start timestamp in ms"
int(time.time() * 1000), # end timestamp in ms
"5m", # interval
"log_timestamp", # time field
"Asia/Shanghai") # time zone
qb.add_metric("avg_tcp_re_rate", "avg", "tcp_re_rate")
qb.add_metric("avg_cpu", "avg", "cpu_idle")
qb.add_date_histogram_bucket("ts")
qb.add_terms_bucket("nodename", "nodename", "20", {"tcp_re_rerate": "desc"})
es_query = qb.build()
print(es_query)
Metadata
Release files for es-simple 0.0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| es_simple-0.0.7.tar.gz | 3.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| es_simple-0.0.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.7 kB
Release files / es_simple-0.0.7.tar.gz
| Download URL | es_simple-0.0.7.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
58e7b5776eb892b1f276cb5a7aa79d60ace998bff7037ba2200ef51d744405c2
|
|
BLAKE2b-256 checksum How to use checksums |
129ab524daf491b2b3fd6ac501a68d7a2a04dc0b42650e81c4a31bbbb11dceb7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.9
|
Release files / es_simple-0.0.7-py3-none-any.whl
| Download URL | es_simple-0.0.7-py3-none-any.whl |
|---|---|
| Size | 3.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2a953493f9fa9774524f18ba75b7831551901425aa588dad3ffbf2738d062d92
|
|
BLAKE2b-256 checksum How to use checksums |
e87fbd9ab7f4f253d7373fbc0ac778f386d5e0a9a564fefa7a9c6595c1e49d70
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.9
|