Skip to main content

OpenSearch SearchIndexPort adapter for muscles-data

Project description

muscles-data-opensearch

OpenSearch 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 OpenSearch-backed SearchIndexPort implementation.

Related packages

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_opensearch import OpenSearchSearchFactory

catalog = DataAdapterCatalog.with_defaults()
catalog.register(OpenSearchSearchFactory())

runtime = DataRuntime(config=config, catalog=catalog)
search = runtime.require_port("search.public", SearchIndexPort)

Resource config stays in the project:

data:
  resources:
    search.public:
      type: opensearch
      url: ${OPENSEARCH_URL}
      username: ${OPENSEARCH_USER}
      password: ${OPENSEARCH_PASSWORD}
      index: docs
      timeout: 3
      verify_certs: true

The adapter creates the OpenSearch client and a missing index lazily on search, index/delete, explicit native access or data.doctor. New indexes receive a default mapping for text, title and metadata; mapping and settings resource options customize it. Application code should use SearchIndexPort; direct client access is only an advanced escape hatch with native_client: true.

See muscular-example/example_data_opensearch_1 for an executable example.

Project details


Download files

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

Source Distribution

muscles_data_opensearch-0.1.0.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

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

muscles_data_opensearch-0.1.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file muscles_data_opensearch-0.1.0.tar.gz.

File metadata

  • Download URL: muscles_data_opensearch-0.1.0.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for muscles_data_opensearch-0.1.0.tar.gz
Algorithm Hash digest
SHA256 413539d670fff9917b5b4a706a43105e522222f9c5fcc40b148c88b6c3ea3288
MD5 c186b3b29b963b365989f0180adb47ea
BLAKE2b-256 2d1aecc6941c5e821440e349ad059d5c28fdbd3b04769e87b26483f9ccda4dc7

See more details on using hashes here.

Provenance

The following attestation bundles were made for muscles_data_opensearch-0.1.0.tar.gz:

Publisher: release.yml on butkoden/muscles-data-opensearch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file muscles_data_opensearch-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for muscles_data_opensearch-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c8a585eaedf11f828f7787632060e5c4b088d2aa94fb91c35133e2f0f3482941
MD5 f32485cb0724f49d492361eb9831d56b
BLAKE2b-256 00e43ab0ad507bce91a46c014dc5ee35a195faf23b8dc10e98144fd8bbc13a85

See more details on using hashes here.

Provenance

The following attestation bundles were made for muscles_data_opensearch-0.1.0-py3-none-any.whl:

Publisher: release.yml on butkoden/muscles-data-opensearch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page