Elasticsearch SearchIndexPort adapter for muscles-data
Project description
muscles-data-elasticsearch
Elasticsearch adapter package for muscles-data.
This package is intentionally separate from muscles-data: the core package
owns typed ports, resource runtime and diagnostics, while this package owns the
Elasticsearch-backed SearchIndexPort implementation.
Related packages
- Core runtime and port contracts:
muscles-data - OpenSearch search adapter:
muscles-data-opensearch - Redis key-value/lock/stream adapter:
muscles-data-redis - Qdrant vector adapter:
muscles-data-qdrant - MongoDB document-store adapter:
muscles-data-mongodb - S3 object-store adapter:
muscles-data-s3 - SQLAlchemy direct SQL resource adapter:
muscles-data-sqlalchemy - Executable example:
example_data_elasticsearch_1
Usage
Register the factory in the project composition root:
from muscles_data.catalog import DataAdapterCatalog
from muscles_data.ports import SearchIndexPort
from muscles_data.runtime import DataRuntime
from muscles_data_elasticsearch import ElasticsearchSearchFactory
catalog = DataAdapterCatalog.with_defaults()
catalog.register(ElasticsearchSearchFactory())
runtime = DataRuntime(config=config, catalog=catalog)
search = runtime.require_port("search.elastic", SearchIndexPort)
Resource config stays in the project:
data:
resources:
search.elastic:
type: elasticsearch
url_env: ELASTICSEARCH_URL
api_key: ${ELASTICSEARCH_API_KEY}
index: docs
timeout: 3
verify_certs: true
The adapter creates the Elasticsearch client and index lazily on search, index/delete,
explicit native access or data.doctor. Application code should use
SearchIndexPort; direct client access is only an advanced escape hatch with
native_client: true.
Missing indexes are created with a default mapping for text, title and
metadata; mapping and settings resource options can customize it.
upsert_documents() uses Elasticsearch bulk operations.
See muscular-example/example_data_elasticsearch_1 for an executable example.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file muscles_data_elasticsearch-0.1.1.tar.gz.
File metadata
- Download URL: muscles_data_elasticsearch-0.1.1.tar.gz
- Upload date:
- Size: 11.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b84d1d95a07cfe6a512c7452f4da335945d5010902578b1609134fc0919e91c
|
|
| MD5 |
ccf92d11667e97add7b36999b4bd0bf5
|
|
| BLAKE2b-256 |
3a5b1440c0ed57c728f19ec9ba9a912a1d8484684d7b2095cb55cec72fb3ce6f
|
Provenance
The following attestation bundles were made for muscles_data_elasticsearch-0.1.1.tar.gz:
Publisher:
release.yml on butkoden/muscles-data-elasticsearch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
muscles_data_elasticsearch-0.1.1.tar.gz -
Subject digest:
0b84d1d95a07cfe6a512c7452f4da335945d5010902578b1609134fc0919e91c - Sigstore transparency entry: 2261287636
- Sigstore integration time:
-
Permalink:
butkoden/muscles-data-elasticsearch@3e879f7c7faef7b9f6b5d47f4e70de7760cb452e -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/butkoden
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3e879f7c7faef7b9f6b5d47f4e70de7760cb452e -
Trigger Event:
release
-
Statement type:
File details
Details for the file muscles_data_elasticsearch-0.1.1-py3-none-any.whl.
File metadata
- Download URL: muscles_data_elasticsearch-0.1.1-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8afefe120346c9e024cd31360bacff7c9c404c9320446f1c6352601006fb247
|
|
| MD5 |
10d4277ef00f7ff2e518fc1e0549daeb
|
|
| BLAKE2b-256 |
2494169af245f4ef27a25b37fa789fec67d851b5287dd9e512455fd7ae274f54
|
Provenance
The following attestation bundles were made for muscles_data_elasticsearch-0.1.1-py3-none-any.whl:
Publisher:
release.yml on butkoden/muscles-data-elasticsearch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
muscles_data_elasticsearch-0.1.1-py3-none-any.whl -
Subject digest:
b8afefe120346c9e024cd31360bacff7c9c404c9320446f1c6352601006fb247 - Sigstore transparency entry: 2261287896
- Sigstore integration time:
-
Permalink:
butkoden/muscles-data-elasticsearch@3e879f7c7faef7b9f6b5d47f4e70de7760cb452e -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/butkoden
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3e879f7c7faef7b9f6b5d47f4e70de7760cb452e -
Trigger Event:
release
-
Statement type: