Skip to main content

pybana

Build Status codecov

🚧 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 visualization definition into an elasticsearch query.
    • vega. It transforms a kibana visualization and data fetched into a vega spec.

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-pattern correspond to a table defined somewhere else (like a sql table), you may want to automate the creation of index-pattern.
  • If a dashboard is 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.4.1

  • Fix format_from_interval for week intervals

0.4.0

  • Handle Category axe rotation

0.3.1

  • Handle ZeroDivisionError in datasweet

0.3.0

  • Rename Context to Scope
  • Add BaseDocument.json_attrs to simplify parsing of some fields (ex: Dashboard.panelsJSON)
  • Add datasweet support
  • Add support for using in client

0.2.0

  • Add Search model
  • Add VegaRenderer and vega-cli

0.1.0

  • First version

Release files for pybana 0.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pybana 0.4.1
File Size Uploaded
pybana-0.4.1.tar.gz 30.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pybana 0.4.1
File Interpreter ABI Platform
pybana-0.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 34.6 kB

Release files / pybana-0.4.1.tar.gz

Download URL pybana-0.4.1.tar.gz
Size 30.8 kB
Tags Source
SHA-256 checksum
How to use checksums
3eeb094e5bee1ed1bc711209232eb84d072524119a467390cef277d26b406976
BLAKE2b-256 checksum
How to use checksums
776e090d7f96fa1134bd9427179a8abb9cc5a1d768880282c061d0e8182b7d76
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/41.6.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.5

Release files / pybana-0.4.1-py3-none-any.whl

Download URL pybana-0.4.1-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fefd0a48c35f31d9dd181b9045077b974e24662117af9f837045f9bce8dd9480
BLAKE2b-256 checksum
How to use checksums
2a81cba773ba23933dfe762ced120106e3b899d96f731f783edf6c5fabe29563
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/41.6.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.5

Release history Release notifications | RSS feed

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.0

2 release files

0.5.6

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.2

2 release files

This release

0.4.1 This release

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.1

1 release file

0.1.0

2 release files

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