Package: pybana
pybanaGithubDocumentation🚧 CAREFUL! WORK IN PROGRESS 🚧What is this?This is a kibana client written in python. It provides two kind of utilitiesAn ORM layer. The goal is to ease the manipulation of kibana objects such asindex-pattern,visualization,dashboard. This ORM provides:Modeling usingelasticsearch_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 kibanavisualizationdefinition into an elasticsearch query.vega. It transforms a kibanavisualizationand data fetched into avegaspec.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 anindex-patterncorrespond to a table defined somewhere else (like a sql table), you may want to automate the creation ofindex-pattern.If adashboardis 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…).RoadmapORMAutomatic creation of index patternElastic translator:Handle more bucket type: ipv4, significatn terms etcHandle more metrics: top hit, sibling etcVega translator:Handle more visualization types (gauge, metric, map etc)VersionsFor now, only elk stack 6.7.1 is handled.LicenseLicensed under MIT license.History0.7.2Fix metric label for datasweet formula0.7.1Fix handling of response in TopHitsMetrics0.7.0Add support for top_hitsFix handle searches in dashboards0.6.3Fix escaping of metric label0.6.2Fix when value is null. Then value is ignored.0.6.1FixContextVisualization.is_duration_agg0.6.0Add support for duration formating for axes that represent a duration serie.0.5.6Fix packaging0.5.5Clip line when y-axis extent is set0.5.4Support vega viz without data.url attributeFix none type handling on datasweet eval0.5.3Fix terms custom metric0.5.2Fix nan values in bucket due to datasweet formula0.5.1Fix case when a datasweet formula depends on other datasweet formula0.5.0Add support for vega visualizations0.4.2Fix Add support for terms sorting by custom metric0.4.1Fixformat_from_intervalfor week intervals0.4.0Handle Category axe rotation0.3.1Handle ZeroDivisionError in datasweet0.3.0RenameContexttoScopeAddBaseDocument.json_attrsto simplify parsing of some fields (ex: Dashboard.panelsJSON)Add datasweet supportAdd support forusingin client0.2.0AddSearchmodelAddVegaRendererand vega-cli0.1.0First version