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.2.tar.gz (127.8 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.2-py3-none-any.whl (34.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: oa_configurator-0.1.2.tar.gz
  • Upload date:
  • Size: 127.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","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.2.tar.gz
Algorithm Hash digest
SHA256 03980414e02fe2d31a62d2e96fc5dca9752fb5958eec8cc72d9798ea922e05b5
MD5 4dd8a4d8934317750d3e7023ea916406
BLAKE2b-256 7c9a9c2f0fc040acc0c55da2b46caf9300cd28b889195b6b51b6e7cb28f080f9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: oa_configurator-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 34.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e2d2643e5d32bd64c904e55ec22ba11a978b244f3c18349a769ff4a8cdf5b24d
MD5 3dbdb2a3200f750857d6082160714c92
BLAKE2b-256 5d16617057decd5e309a2ff2667c68b8ac2662e3998550339f64dde22e1c4536

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