This project has been archived by its maintainers, and is no longer receiving any updates.
jsl_elasticsearch generates ElasticSearch mappings from JSL definitions.
It requires Python 3.4 or later (mainly for functools.singledispatch).
It is specifically aimed at use cases where ElasticSearch is being used as a time series database for JSON data with schemas defined using the jsl Python library.
The main API is jsl_elasticsearch.render_es_template:
def render_es_template(document, title, role, doc_type="content"):
"""Render an ElasticSearch time series template for given JSL document
Template name is generated from the given *title* and *role*
Document variables are resolved using the given *role*
*doc_type* specifies the ElasticSearch mapping name (default: "content")
"""
The @timestamp field expected by Kibana is added automatically, and string fields are flagged as not_analyzed by default (so ElasticSearch treats them as opaque tokens, rather than as plain text fields to be analyzed for full text search)
The following JSL field types are currently supported:
jsl.StringField
jsl.NumberField
jsl.IntField
jsl.ArrayField
jsl.DictField
jsl.DocumentField
An additional field type is also defined:
jsl_elasticsearch.TextField
With string fields being flagged as opaque tokens by default, TextField is a new StringField subclass that flags the field for full text search in the ElasticSearch mapping, but is otherwise handled exactly like StringField by JSL.
Release files for jsl-elasticsearch 0.1.dev0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jsl-elasticsearch-0.1.dev0.tar.gz | 5.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jsl_elasticsearch-0.1.dev0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.9 kB
Release files / jsl-elasticsearch-0.1.dev0.tar.gz
| Download URL | jsl-elasticsearch-0.1.dev0.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
af4273c3c584710ab07428020d32bfdf9053e2e09a3bf50c3a924a5fc49a12ae
|
|
BLAKE2b-256 checksum How to use checksums |
e9815e8007538718881fd78627c5ec6fd9d411b67397ccc5b689eaf9595f1806
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / jsl_elasticsearch-0.1.dev0-py3-none-any.whl
| Download URL | jsl_elasticsearch-0.1.dev0-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
717ce3a04c4b489a2c2000c2361ddff66da093e01d18c76c476cb9b564723b15
|
|
BLAKE2b-256 checksum How to use checksums |
90b0a1558f80716e5cf12ad951ffb0c23ddc032e312cb4ff75241ecbd6263659
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |