Scan your whole stack
From OX Research Newsroom
Are you using corr-vars?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v2.2.0
corr-vars was last scanned on 30 Nov 2026 at version 2.2.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 2.2.0 LATEST | 30 Nov 2026 | No rules fired |
| 2.1.1 | 22 Oct 2026 | No rules fired |
| 2.1.0 | 22 Oct 2026 | No rules fired |
Findings for v2.2.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 2.2.0; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
Build and manage clinical study cohorts from ICU and hospital data sources. Add, filter and export variables whose definitions are served — and versioned — by the CORR Concepts API.
uv add corr-vars
or pip install corr-vars. The development version (latest main) is available via
uv add git+https://github.com/CUB-CORR/corr_vars.
Requires Python ≥ 3.10.
from corr_vars import Cohort
cohort = Cohort(
obs_level="icu_stay", # "patient" | "hospital_stay" | "icu_stay" | "procedure"
sources={"reprodicu": {"path": "/path/to/reprodICU_files"}},
project="my_project", # project on the Concepts API
# api_key="corr_..." # or set CORR_CONCEPTS_API_KEY
)
# Add a pre-defined variable
cohort.add_variable("blood_sodium")
# Apply inclusion criteria and visualise the flowchart
cohort.include_list([
{"variable": "age_on_admission", "operation": ">= 18", "label": "Adults"},
{"variable": "icu_length_of_stay", "operation": "> 2", "label": "ICU stay > 2 days"},
])
cohort.figureone
# Export
cohort.save("my_cohort.corr3")
cohort.to_csv("output/")
The charite_demo source reads a public, fully synthetic ICU dataset (20'000 ICU
stays), and the public demo Concepts API serves its variable definitions, so you can
try corr_vars without data access or an account:
cohort = Cohort(
obs_level="icu_stay",
sources={"charite_demo": {}},
project="demo",
api_key="cak_demo_0d2b53ac", # public demo key
)
Install with the extra (uv add "corr-vars[charite-demo]")
and follow the demo tutorial.
For a hands-on notebook to run yourself, see examples/.
cohort.codebook("output_agg") writes codebook.md and codebook.json: dtype,
missingness and coarse distributions of every obs column and obsm frame, with
small counts suppressed and no patient-level value, so the shape of a cohort can be
shared with someone (or a coding agent) who has no access to the data. See
Codebook.
The package installs a corr command for building a study with a coding agent
(Claude Code, OpenCode). Try it on the demo data, no account needed:
uv tool install corr-vars
corr init --demo my-study # study on charite_demo + the public demo Concepts API
It also looks up concepts (corr concepts search, corr concepts show), writes
codebooks (corr codebook), installs the agent skill into any project (corr skill install) and, when the data stay on a server, copies the code there and the
aggregated results back (corr push, corr pull). See the
CLI documentation.
obs_level |
Primary key | One row per … |
|---|---|---|
"patient" |
patient_id |
patient |
"hospital_stay" |
case_id |
hospitalisation |
"icu_stay" |
icu_stay_id |
ICU admission |
"procedure" |
procedure_id |
surgical procedure |
Sources are plugins: each is a package under src/corr_vars/sources/ that
supplies cohort data and, optionally, variable extraction. Multiple sources can
be combined in a single Cohort call.
Three sources ship with the package: charite_demo, the public synthetic demo
dataset (see above), reprodicu, a ready-to-use example, and local_datasource, a
skeleton you bind to your own store.
The plug-and-play example source. Download the
reprodICU parquet files and pass their
folder as path — nothing else to configure.
sources = {
"reprodicu": {
"path": "/path/to/reprodICU_files",
"include_datasets": [],
"exclude_datasets": [],
}
}
local_datasource)A source skeleton, pinned local in routing.toml: it ships the variable
classes (NativeStatic, DerivedStatic, DerivedDynamic, NativeDynamic,
ComplexVariable) and the extraction pipeline, but no store. Bind it to your
own data in two places:
cohort.load_data(obs_level, source_kwargs) so it returns the
observation frame (primary key plus the level's t_min/t_max anchors).NativeExtractor, implement extract(cohort, id_column), and set
NativeDynamic.extractor_class to your subclass.Then fill mapping/vars.json and mapping/variables.py with your variable
definitions, or route the source to a Concepts API endpoint instead. See the
local_datasource API reference.
The aggregation classes are source-agnostic — construct one directly and add it to any cohort, including a reprodICU one:
from corr_vars import Cohort
from corr_vars.sources.local_datasource import DerivedStatic, NativeStatic
cohort = Cohort(
obs_level="icu_stay",
sources={"reprodicu": {"path": "/path/to/reprodICU_files"}},
project="my_project",
)
cohort.add_variable(NativeStatic(
var_name="max_sodium_icu",
select="!max value",
base_var="blood_sodium",
tmin="icu_admission",
tmax="icu_discharge",
))
cohort.add_variable(DerivedStatic(
var_name="hypernatremia",
requires=["max_sodium_icu"],
expression="max_sodium_icu > 145",
))
base_var and requires resolve through the cohort's own sources. Pass
tmin/tmax inside the constructor, not to add_variable. Full reference:
aggregation variables.
Variable definitions are not bundled with this package. They are fetched per
concept and per source from the CORR Concepts API, which also records the exact
version that was served. Routing is declared in
src/corr_vars/concepts/routing.toml:
[local]
sources = ["local_datasource"]
[[endpoint]]
url = "https://concepts.example.edu/api"
sources = ["*"]
A cohort authenticates against that endpoint on construction, so a missing
project or a bad key fails before the (slow) data load:
cohort = Cohort(project="my_project", api_key="corr_...")
cohort = Cohort(project="my_project", date="2025-06-30") # freeze to a day
cohort.add_variable("blood_sodium::v3") # pin one variable
Point a cohort at a different endpoint with Cohort(concepts_api_url=...).
Sources listed under [local] in routing.toml are never fetched; their
definitions are read from the source's bundled mapping module and keep working
with no network and no API key. local_datasource is the one bundled source
listed there.
git clone https://github.com/CUB-CORR/corr_vars.git
cd corr_vars
uv sync --group dev
uv run pre-commit install
Pre-commit hooks enforce uniform formatting and catch common errors. When a hook modifies a file, stage the change and commit again.
If you have developed new features, please add relevant tests to the tests/ folder.
uv run pytest
Integration tests (tests/integration) run automatically once a pull request to main is opened. Results are attached to the pull request and a test report will be generated. Do not merge until tests pass.
tests/sources is hand-run: it needs the source's own data files plus a Concepts API project and key, skips when they are missing, and runs only when named (uv run pytest tests/sources). A bare uv run pytest runs tests/integration only, like CI, which needs neither.
cd docs
make clean && make html
# or: rm -rf _build && uv run sphinx-build -M html . _build
The HTML output is written to docs/_build/html/. Documentation is automatically published to docs.corr-vars.de on merge to main.
Releases are published to PyPI as corr_vars by .github/workflows/release.yml using Trusted Publishing (OIDC). No API token is stored anywhere.
One-time setup
corr_vars, owner CUB-CORR, repository corr_vars, workflow release.yml and environment pypi. The first successful publish creates the project.pypi. You can optionally add required reviewers to pypi and restrict it to v* tags.Release procedure
__version__ in src/corr_vars/__init__.py and version / date-released in CITATION.cff, then merge to main.git tag v2.0.3 && git push origin v2.0.3.The workflow first checks that the tag, __version__ and CITATION.cff agree. It then runs the tests, builds and checks the sdist and wheel, publishes to PyPI and creates the GitHub release with the built files attached.
See the Contributing Variables guide for variable contributions in the documentation.
main using the naming convention IssueNumber-IssueTitle.MIT — see LICENSE.md.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.