Skip to main content

chibi_elasticsearch

https://img.shields.io/pypi/v/chibi_elasticsearch.svg Documentation Status

chibi_elasticsearch is a lightweight Python package that provides templates and reusable snippets for working with Elasticsearch. It is intended to simplify common tasks such as creating models class.

The package is designed to work with elasticsearch_dsl.

basic use

models

from chibi_elasticsearch.models import Chibi_model
from chibi_elasticsearch.analyzers import name_space, name
from chibi_elasticsearch.snippet import create_index_if_not_exists
from elasticsearch_dsl import field


class Person( Chibi_model ):
        name = field.Text(
                analyzer=name, multi=True,
                fields={
                        'space': field.Text( analyzer=name_space, multi=True ),
                        'keyword': field.Keyword( multi=True ),
                }
        )

create_index_if_not_exists( Person )

some_one = Person( name="john smith" )
some_one.save()
print( "name:", some_one.name )
print( "create_at:", some_one.create_at )
print( "update_at:", some_one.update_at )

review config

from chibi_elasticsearch.config import load_elasticsearch_config, review_elasticsearch_config
from chibi.config import configuration

configuration.elasticsearch.connections.default.hosts = 'localhost'
configuration.elasticsearch.connections.default.port = 80
configuration.loggers[ 'elasticsearch' ].level = "WARNING"

# Load connections (e.g., from chibi config)
load_elasticsearch_config()

# Check configuration
if not review_elasticsearch_config():
        raise RuntimeError("Elasticsearch not configured correctly")

History

3.0.0 (2026-07-24)

  • Se agrego un search wrapper para la funcion search de los modelos ahora los elementos de la clase Q pueden ser usandos en el search

2.0.0 (2026-07-24)

  • fabricas genericas para modelos de Chibi_model

  • se agrego la depencia de chibi_hybrid

  • se agrego la clase magica Q a los modelos

  • se agrega el field Url y Basic_name

1.4.1 (2026-07-08)

  • timedelta field puede deserializar timedelta,

    es nesesario cuando hace el save para la funcion clean

1.4.0 (2026-07-06)

  • se agrego el field timedelta

1.3.0 (2026-03-20)

  • add shorcut for mock save from documents

  • add property for pk

1.2.0 (2026-03-04)

  • add shortcut class to do unittest with vcr that ignore all configured hosts

  • add function to get all hosts configured

1.1.0 (2026-03-03)

  • add logic for build test index using chibi config

    from chibi.config import configuration
    configuration.elasticsearch.test_app = True
    assert build_index_name( 'hello' ) == 'test__hello'

1.0.0 (2026-03-03)

  • definition for base model and analyzers

  • configuration handling for connections

  • analyzers ready for text processing

  • basic model with automatic created_at and updated_at fields

0.0.1 (2026-03-03)

  • First release on PyPI.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chibi_elasticsearch-3.0.0.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chibi_elasticsearch-3.0.0-py2.py3-none-any.whl (10.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file chibi_elasticsearch-3.0.0.tar.gz.

File metadata

  • Download URL: chibi_elasticsearch-3.0.0.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for chibi_elasticsearch-3.0.0.tar.gz
Algorithm Hash digest
SHA256 1a5f97366043cb5693e85bc2b5e65c030d129665f9c7c89903649292d3a607dc
MD5 c41a7d5ff248d3965fb4ef722f0580ab
BLAKE2b-256 2597f9de1ba2f883994c3de2d068f8b58cf886cac0a5b77545077aa43c0aa478

See more details on using hashes here.

File details

Details for the file chibi_elasticsearch-3.0.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for chibi_elasticsearch-3.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f9641efdaaa500db56d9f574abf50a3121a6d439bc442110ef57e61bd85ed913
MD5 b2982eec01cdf29b29935163ddd2940f
BLAKE2b-256 92df9a0014eb57680c47b2b0b950a07f40b5cdcda7f7d4afee7f4cd2f2f7c5e7

See more details on using hashes here.

Release history Release notifications | RSS feed

3.1.0

2 files

This release

3.0.0 This release

2 files

2.0.0

2 files

1.4.1

2 files

1.4.0

2 files

1.3.0

2 files

1.2.0

2 files

1.1.0

2 files

1.0.0

2 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