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.0.tar.gz (84.1 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.0-py3-none-any.whl (30.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: oa_configurator-0.1.0.tar.gz
  • Upload date:
  • Size: 84.1 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.0.tar.gz
Algorithm Hash digest
SHA256 2bd8e8416abc4dc99ff78a7961b445c499e7fd25f649a967be037fec5f2d2d08
MD5 85bf13796e4bcf235b11be5ef64f441f
BLAKE2b-256 04bfabe1fd37a4e717d10b53ce1f73f91ddc8baef39d0c1bda0c6123bf702a6e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: oa_configurator-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7165984090711adff857a76d0468bb789f9b4756081a5688f609f487391a8dba
MD5 c7ce4bf3a8fdd907070aecc023255452
BLAKE2b-256 4aab18695a718a53526823d7bf32194d6d78f4ea6dc0062ee17b43c6058e03f7

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