Skip to main content

Prototype shared configuration layer for the OMOP-oriented stack.

Project description

oa-configurator

oa-configurator is a shared configuration layer across the OMOP-oriented public stack.

Goals

  • one obvious human-managed config file
  • typed config models for code usage
  • named connections and named logical resources
  • support for single-DB and split-DB deployments
  • support for local file-based artifacts like DuckDB and FAISS
  • clean migration path from today’s env-var-heavy tools
  • stable relative path semantics via one configuration base directory
  • opt-in file or env backed secret resolution for connection passwords

App Shape

This folder currently includes:

  • a standalone package scaffold
  • typed models for config structure
  • a TOML loader
  • a simple resolver for logical resources and tool defaults
  • an example config.toml
  • an architecture note describing the intended evolution

Proposed Default Config Location

~/.config/omop/config.toml

This prototype does not force that location, but it uses it as the default when no explicit path is provided.

When a profile defines resource_overrides or tool_overrides, those patches are applied by the resolver at access time rather than mutating the raw loaded config object.

Connection passwords may be provided inline with password or indirectly with secret_source. Supported secret source formats are:

  • env:VARIABLE_NAME
  • file:relative/or/absolute/path

When settings.secrets_dir is configured, relative file: sources resolve from that directory. Otherwise they resolve from configuration_base_path.

Example

from oa_configurator import load_stack_config, Resolver

config = load_stack_config()
resolver = Resolver(config)

resource = resolver.resolve_resource("default")
tool = resolver.resolve_tool("omop_emb")

print(resource.database.database_name)
print(resource.database.safe_url)
print(resource.vocab_db_is_primary_fallback)
print(resource.schema_translate_map())
print(tool.backend)
print(resolver.configuration_base_path)
print(config.secrets_dir)
print(resolver.active_profile_name())

Notes

  • This is still a sketch library, not a production-ready replacement.
  • The resolver API is intentionally small for now.
  • Compatibility shims for legacy env var consumers are described in docs/architecture.md but not implemented yet.

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

oa_configurator-0.1.1.tar.gz (123.2 kB view details)

Uploaded Source

Built Distribution

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

oa_configurator-0.1.1-py3-none-any.whl (30.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: oa_configurator-0.1.1.tar.gz
  • Upload date:
  • Size: 123.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for oa_configurator-0.1.1.tar.gz
Algorithm Hash digest
SHA256 888608c265799e670097bbb5d967460449c51e03dabe97176ad8443d992ce3e6
MD5 b3add91b1fefc17027449814ba8b2590
BLAKE2b-256 0d7b1c3aa611b6a4b0441314e3f8fbbf66e4a6dd3377ff039b434d6e69d6a52f

See more details on using hashes here.

File details

Details for the file oa_configurator-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: oa_configurator-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 30.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for oa_configurator-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2b63a87c6d242b6e49b219d61bbacf664454beb1755e8747cdff910611633747
MD5 378b33a341773aa2b5b833c6dc8e7908
BLAKE2b-256 c9877437b6dce109f7c84267ec1b87bd1897bb983ba0dcc4d5fba82b28d2bc20

See more details on using hashes here.

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