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.1.tar.gz (10.5 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.1-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: muscles_data_opensearch-0.1.1.tar.gz
  • Upload date:
  • Size: 10.5 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.1.tar.gz
Algorithm Hash digest
SHA256 90c8e4c10b1b3aa6a0d98f6624191652d46ab2d9aad9dd6205454a25dc5aec8a
MD5 6762280d97bfbdc1c73d8805fbe05a51
BLAKE2b-256 c4a5c24a7047797bdd362135732e60d41e4c53684a05fc687fbce4960a6a1c19

See more details on using hashes here.

Provenance

The following attestation bundles were made for muscles_data_opensearch-0.1.1.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.1-py3-none-any.whl.

File metadata

File hashes

Hashes for muscles_data_opensearch-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e5260bef6dcf6f5b6a7b08d86bef684557cac2a6014374e1335b01183066449e
MD5 f16c54e8625a65ef1e65fb5a9e086dd0
BLAKE2b-256 0779266319c9a2e6d5cc242bd1d871acf2323836cd9b118e6317ac4ce03833cc

See more details on using hashes here.

Provenance

The following attestation bundles were made for muscles_data_opensearch-0.1.1-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