pybana
🚧 CAREFUL! WORK IN PROGRESS 🚧
What is this?
This is a kibana client written in python. It provides two kind of utilities
- An ORM layer. The goal is to ease the manipulation of kibana objects such as
index-pattern,visualization,dashboard. This ORM provides:- Modeling using elasticsearch_dsl.
- helpers to extract useful information from kibana objects (ex: the index pattern associated to a visualization).
- reverse relationships between index-pattern & visualizations, visualizations & dashboards.
- A translation layer. The goal is to mimic kibana behaviour in terms of data fetching and visualization rendering. Thus, there are two types of translators:
- elastic. It transforms a kibana
visualizationdefinition into an elasticsearch query. - vega. It transforms a kibana
visualizationand data fetched into a vega spec.
- elastic. It transforms a kibana
Why?
The ORM was implemented to ease the automatic creation/update of kibana objects. For instance:
- If you've added an access-control layer on top of kibana to handle multi-tenancy, you may want to automate the creation of kibana indexes and the default index-pattern.
- If an
index-patterncorrespond to a table defined somewhere else (like a sql table), you may want to automate the creation ofindex-pattern. - If a
dashboardis defined in another database (like a sql db), you may want to delete the kibana object if the sql object is deleted.
The translation layer was implemented to progressively get rid of kibana. Even if kibana is a fantastic tool, it's more meant for internal use than for an integration in another application.
The elastic translator aims to generate almost identical queries to elasticsearch as kibana.
The vega translator tries to provide an equivalent in vega of kibana visualisation. Currently, it supports a limited set of options. Vega was chosen as it provide a complex but almost exhaustive visualization grammar. Vega'sapi allows the rendering of visualizations both on the backend and frontend and has bridges with the main js frameworks (react, vue…).
Roadmap
- ORM
- Automatic creation of index pattern
- Elastic translator:
- Handle more bucket type: ipv4, significatn terms etc
- Handle more metrics: top hit, sibling etc
- Vega translator:
- Handle more visualization types (gauge, metric, map etc)
- Versions
- For now, only elk stack 6.7.1 is handled.
License
Licensed under MIT license.
History
0.7.2
- Fix metric label for datasweet formula
0.7.1
- Fix handling of response in TopHitsMetrics
0.7.0
- Add support for top_hits
- Fix handle searches in dashboards
0.6.3
- Fix escaping of metric label
0.6.2
- Fix when value is null. Then value is ignored.
0.6.1
- Fix
ContextVisualization.is_duration_agg
0.6.0
- Add support for duration formating for axes that represent a duration serie.
0.5.6
- Fix packaging
0.5.5
- Clip line when y-axis extent is set
0.5.4
- Support vega viz without data.url attribute
- Fix none type handling on datasweet eval
0.5.3
- Fix terms custom metric
0.5.2
- Fix nan values in bucket due to datasweet formula
0.5.1
- Fix case when a datasweet formula depends on other datasweet formula
0.5.0
- Add support for vega visualizations
0.4.2
- Fix Add support for terms sorting by custom metric
0.4.1
- Fix
format_from_intervalfor week intervals
0.4.0
- Handle Category axe rotation
0.3.1
- Handle ZeroDivisionError in datasweet
0.3.0
- Rename
ContexttoScope - Add
BaseDocument.json_attrsto simplify parsing of some fields (ex: Dashboard.panelsJSON) - Add datasweet support
- Add support for
usingin client
0.2.0
- Add
Searchmodel - Add
VegaRendererand vega-cli
0.1.0
- First version
Metadata
Release files for pybana 0.7.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pybana-0.7.2.tar.gz | 30.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pybana-0.7.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 63.9 kB
Release files / pybana-0.7.2.tar.gz
| Download URL | pybana-0.7.2.tar.gz |
|---|---|
| Size | 30.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
83c16852be9eff5309795a98bc765170910f01afa3a4db84146d351e7d6a704e
|
|
BLAKE2b-256 checksum How to use checksums |
d8809698e2e4369b34e3217b5ac6c7503fa48257ec8b847fa73750132a8c94dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.0.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/54.1.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.5
|
Release files / pybana-0.7.2-py3-none-any.whl
| Download URL | pybana-0.7.2-py3-none-any.whl |
|---|---|
| Size | 33.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
98235d2817a9df2bc568d8e51d62d5a5870fb3dc07b65962f0c6c90ea171df80
|
|
BLAKE2b-256 checksum How to use checksums |
0764753c0d12afa88bae89b9ee301991a475cd910122b9b3e552fa97dc4121be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.0.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/54.1.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.5
|