Skip to main content

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)

Source distribution for es-simple 0.0.7
File Size Uploaded Provenance Actions
es_simple-0.0.7.tar.gz 3.1 kB Without provenance Details for es_simple-0.0.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for es-simple 0.0.7
File Interpreter ABI Platform Actions
es_simple-0.0.7-py3-none-any.whl Python 3 none any Details for es_simple-0.0.7-py3-none-any.whl

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

Security for es-simple 0.0.7

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page