esq
Install - Init - Usage - Documentation
A python package that provides GraphQL API for Elasticsearch and makes it easier to query data without writing complex queries.
Install
pip install esq
Init
>>> from esq import Esq
>>> from elasticsearch import Elasticsearch
# init your Elasticsearch client object here
>>> ELASTICSEARCH_URI = "http://localhost:9200"
>>> es_client = Elasticsearch([ELASTICSEARCH_URI])
# init your Esq object here
>>> esq = Esq(es_client)
# now you can start making queries
Usage
# to get aggregation on sentiment field on your twitter index, you can simply do:
>>> sentiments = esq.get_aggr_data(index='twitter',
data_type='keyword/text', #data_type is an enum('keyword/text', 'coordinates', 'timeseries')
data_field='sentiment')
>>> print(sentiments)
[{'label': 'positive', 'value': 9}, {'label': 'neutral', 'value': 7}, {'label': 'negative', 'value': 1}]
Documentation
Read the full usage documentation here
History
1.0.3 (10-10-2022)
- Added full usage detailed documentation.
1.0.2 (04-09-2022)
- Add Github Actions workflow for version bumping and release to PyPI.
1.0.1 (30-08-2022)
- Fix Docs and add content README.
1.0.0 (30-08-2022)
- First release on PyPI.
Metadata
Release files for esq 1.0.3
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 | |
|---|---|---|---|---|
| esq-1.0.3.tar.gz | 11.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| esq-1.0.3-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 17.6 kB
Release files / esq-1.0.3.tar.gz
| Download URL | esq-1.0.3.tar.gz |
|---|---|
| Size | 11.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
95d4c8079320f5d6943b1139af8a6fe787ae956c019e04ba3a313f6f230a798d
|
|
BLAKE2b-256 checksum How to use checksums |
c8e0f670f984daf8545a1c7dbe7a467568268150404ce4249a1a1fb2cf8f3a0f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.14
|
Release files / esq-1.0.3-py2.py3-none-any.whl
| Download URL | esq-1.0.3-py2.py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
25bdf0cb150400edd9bf6d59ebc88f6f9bfee27af5491a29b538af59848c1c68
|
|
BLAKE2b-256 checksum How to use checksums |
d788db07a8dd34f49f8b74221dfad4950acc6d40bbda11aeda6823c35da0a9e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.14
|
Security for esq 1.0.3
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.