oa-configurator
oa-configurator is a shared configuration layer for the OMOP-oriented Python stack: one typed config.toml file instead of a tangle of environment variables and package-local .env files.
Core concepts
- Connection: a concrete database endpoint (dialect, host, credentials)
- Database: a named database built on a connection, one of two kinds: a plain generic database, or a CDM database with its vocab/results role bundle
- Provider / Model: the same two-tier pattern as Connection/Database, for LLM and embedding backends
- Vector Store: which storage backend an embedding-capable package should use, pointing at a generic database
- Tool: per-package settings, e.g. which database/model/vector store a package uses
A consuming package subclasses PackageConfigBase, declares its fields with RefTo(...) to name entries in the sections above, and registers via a pyproject.toml entry point. omop-config configure <package> then discovers it and interactively resolves or creates whatever it needs.
Install
pip install oa-configurator
Example
from oa_configurator import load_stack_config, Resolver
config = load_stack_config() # OA_CONFIG_PATH is read at import; set it before process startup
resolver = Resolver(config)
database = resolver.resolve_database("cdm_db")
engine = database.create_engine() # SQLAlchemy Engine, schema_translate_map applied
Or without a file, for tests and scripts:
from oa_configurator import StackConfig, ConnectionConfig, CDMDatabaseConfig, Resolver
config = StackConfig.for_session(
connections={"local": ConnectionConfig(dialect="postgresql+psycopg", host="localhost",
database_name="omop", password="omop")},
databases={"cdm_db": CDMDatabaseConfig(connection="local", schema_name="omop")},
)
engine = Resolver(config).resolve_database("cdm_db").create_engine()
Security
Passwords and API keys are currently stored in plaintext. Restrict file permissions:
chmod 600 ~/.config/omop/config.toml
secret_source (env-var- and file-backed credential lookup, keeping secrets out of the TOML file entirely) is planned but not yet implemented; see Secrets.
Docs
Full documentation, including the config file reference, CLI usage, and package-integration guide: https://AustralianCancerDataNetwork.github.io/oa-configurator/
Metadata
Release files for oa-configurator 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| oa_configurator-1.3.0.tar.gz | 191.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| oa_configurator-1.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 258.7 kB
Release files / oa_configurator-1.3.0.tar.gz
| Download URL | oa_configurator-1.3.0.tar.gz |
|---|---|
| Size | 191.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
70bb6648ce94f9d09f870b02962f40a004d20aec0cfcad45b6a7fd5dcf0fe33a
|
|
BLAKE2b-256 checksum How to use checksums |
eaaa71f787266a0a2baddf9c6452a43be901690acc5f5888de1d07c8f6adbf9b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.
Transparency logRelease files / oa_configurator-1.3.0-py3-none-any.whl
| Download URL | oa_configurator-1.3.0-py3-none-any.whl |
|---|---|
| Size | 67.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9b92391c9033fbab78bd5a26932168dd184ca175f391de8099ce537cf71cf6ab
|
|
BLAKE2b-256 checksum How to use checksums |
d4cd8af5f354c87225732fadcf8213fddbccb6e6468868533e84a0be842e2a62
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.
Transparency log