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/
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file oa_configurator-1.2.0.tar.gz.
File metadata
- Download URL: oa_configurator-1.2.0.tar.gz
- Upload date:
- Size: 182.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c10e76cbf6211b2b29fae48acc1791c6986cb3db76ed58565d04cbdd2d05cad8
|
|
| MD5 |
440972fe8382da82a136d30883772f2d
|
|
| BLAKE2b-256 |
b53fc643124c59c712bf856276b0875eca07f2ddf05ea49ca4c3b810c5963471
|
Provenance
The following attestation bundles were made for oa_configurator-1.2.0.tar.gz:
Publisher:
publish.yml on AustralianCancerDataNetwork/oa-configurator
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
oa_configurator-1.2.0.tar.gz -
Subject digest:
c10e76cbf6211b2b29fae48acc1791c6986cb3db76ed58565d04cbdd2d05cad8 - Sigstore transparency entry: 2502805770
- Sigstore integration time:
-
Permalink:
AustralianCancerDataNetwork/oa-configurator@00f66a3a814eb657e45be45f34d59e1b7058b983 -
Branch / Tag:
refs/tags/v1.2.0 - Owner: https://github.com/AustralianCancerDataNetwork
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@00f66a3a814eb657e45be45f34d59e1b7058b983 -
Trigger Event:
push
-
Statement type:
File details
Details for the file oa_configurator-1.2.0-py3-none-any.whl.
File metadata
- Download URL: oa_configurator-1.2.0-py3-none-any.whl
- Upload date:
- Size: 64.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4319073173fb2825992c98dc76dbd33419a474ca8562162da50ccc391fcc1dc
|
|
| MD5 |
c1f52546a305779e59aac91659191e6f
|
|
| BLAKE2b-256 |
e6b6d2e466aa1070473374e773507744377c356cc2a5fe634ef843b346a366a4
|
Provenance
The following attestation bundles were made for oa_configurator-1.2.0-py3-none-any.whl:
Publisher:
publish.yml on AustralianCancerDataNetwork/oa-configurator
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
oa_configurator-1.2.0-py3-none-any.whl -
Subject digest:
a4319073173fb2825992c98dc76dbd33419a474ca8562162da50ccc391fcc1dc - Sigstore transparency entry: 2502806049
- Sigstore integration time:
-
Permalink:
AustralianCancerDataNetwork/oa-configurator@00f66a3a814eb657e45be45f34d59e1b7058b983 -
Branch / Tag:
refs/tags/v1.2.0 - Owner: https://github.com/AustralianCancerDataNetwork
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@00f66a3a814eb657e45be45f34d59e1b7058b983 -
Trigger Event:
push
-
Statement type: