open-data-store
Created and maintained by Marc Jeulin, part of MyOpenFund.
Bitemporal open-data store for MyOpenFund: dataset contracts, a light writer for producers,
a publisher (the only writer to the lake) and a reader for analyses, the MCP and strategies.
Facts are DuckLake tables (Parquet + a Postgres catalogue), read through DuckDB. Every fact carries
valid_date (what it is about) and known_at (when it became knowable): reads are look-ahead-free.
This library is a tool. It manages nobody's money and gives no investment advice.
Renamed on 2026-11-22 (package, import, command and environment variables): see docs/MIGRATION.md.
Install
pip install "myopenfund-open-data-store[writer]" # producers: pyarrow only
pip install "myopenfund-open-data-store[publisher]" # store operator: DuckDB + DuckLake
pip install "myopenfund-open-data-store[reader]" # analyses, MCP, strategies
If this environment installed the old distribution (open-data-store, from a git URL), run
pip uninstall -y open-data-store before installing myopenfund-open-data-store: both own the same import package.
To try the latest main before a release (dependencies still come from PyPI):
pip install "myopenfund-open-data-store[reader] @ git+https://github.com/MyOpenFund/open-data-store"
Working across repos
Clone the repos side by side and install this package editable over the PyPI version in the
consumer's environment: pip install -e ../open-data-store. A consumer change that needs an
unreleased version waits for this package's release before the consumer's PR merges.
How to release
Bump __version__ and version in a PR. After it merges, go to Actions, then release, then Run workflow: pick the main branch and target pypi. Approve the pypi deployment. The workflow builds the package, checks it, publishes it, then creates the tag v<version> and the GitHub Release itself.
It fails before publishing if it is not run on the default branch or if that tag already exists. Target testpypi is a rehearsal: it publishes to TestPyPI and creates no tag and no release.
Pushing a tag v<version> by hand still works: the workflow checks that the tag equals the package version and is on the default branch, then publishes and attaches the files to the Release.
If PyPI got the package but the tag or the Release is missing, re-run the failed github-release job from Actions; do not push the tag by hand (the re-run would fail at the PyPI upload).
Configuration
| Variable | Meaning |
|---|---|
OPEN_DATA_STORE_DATA_ROOT |
Holds landing/ (batches), lake/ (Parquet), reports/ |
OPEN_DATA_STORE_CATALOG |
DuckLake catalogue: postgres:dbname=... host=... user=..., or a file path (tests, single user) |
OPEN_DATA_STORE_DATA_INLINING_ROW_LIMIT |
Default 0: every batch becomes a Parquet file |
OPEN_DATA_STORE_KNOWN_AT_FUTURE_TOLERANCE_S |
Clock-skew tolerance, default 300 |
OPEN_DATA_STORE_RESOLVING_SCHEMES |
Identifier schemes that may merge entities, default cik,lei,isin,figi,cb_code,national_id |
OPEN_DATA_STORE_SINGLE_VALUED_SCHEMES |
Schemes an entity holds one value of, default cik,lei,cb_code |
Reader interface (stable for v0.x)
from datetime import datetime, timezone
from open_data_store.reader import Recipe, Store, export
store = Store.open() # config from env (or `with Store.open() as store:`)
store.datasets() # name, major, version, kind, licence, table
t = store.read_asof("fundamentals", datetime(2025, 12, 1, tzinfo=timezone.utc),
where="original_tag = 'us-gaap:Revenues'") # pyarrow.Table, latest known per key
t1 = store.read_asof("fundamentals", filters={"source_code": ["sec"]},
columns=["entity_id", "original_tag", "value"], limit=100) # bound, safe for servers
store.read_asof("fundamentals", filters={"entity_value": ["0000320193"]}, vintages=True) # every vintage
store.freshness() # last published_at, batch count
store.describe("fundamentals") # columns, docs, natural key, licence
t0 = store.read_asof("fundamentals", snapshot=42) # what the store held at DuckLake version 42
r = Recipe("debt_by_source", "1.0.0", {"f": "fundamentals"},
"SELECT source_code, sum(value) AS debt FROM f GROUP BY 1")
out = store.assemble(r, as_of=datetime.now(timezone.utc)) # save=True arrives with metrics
# {"f": "fundamentals:vintages"} gives every row knowable at the date, not the latest per key
export(out, "debt.xlsx") # .csv | .xlsx | .parquet
Time zone. The reader's sessions are pinned to UTC: timestamps come back as UTC, and where
and recipe SQL evaluate in UTC whatever the process TZ. Under a non-UTC TZ, earlier versions
evaluated them in local time, so a naive literal (known_at < '2025-07-31') or a date cast can
select other rows now; write explicit offsets (TIMESTAMPTZ '2025-07-31 00:00:00+02').
Performance. Filters on natural-key columns (e.g. entity_value) are always pushed explicitly
before the as-of window, so DuckLake reads only the matching files: on a 20-issuer test store a
filter on entity_value read 1 fundamentals data file (5 kB) instead of 60 files (139 kB). DuckDB
already pushes a filter on the as-of window's partition key (the natural key) through the window by
itself (filtering entity_value outside the window also read 1 file / 5 kB); the explicit push in
read_asof guarantees that pruning whatever the optimizer version. Filters on other columns read
the whole table. Keep one batch per issuer, and do not merge data files
(ducklake_merge_adjacent_files) without measuring: merging issuers into one file defeats the
pruning.
Producers
from open_data_store.writer import write_batch
ref = write_batch(contract, table, landing_root=data_root / "landing",
run_id=run_id, producer="company-corpus", source_inputs=[...])
The writer validates the table against its contract and drops an atomic, idempotent batch in
landing/. It never touches Postgres. A producer declares its own contracts through the
open_data_store.contracts entry-point group; standard contracts (fundamentals, entity_observations,
filing_statements, filings) ship with this library.
Operator
open-data-store contracts list
open-data-store contracts approve fundamentals 3 --by <name> # reviewed step; refuses conflicting definitions
open-data-store contracts approve filing_statements 1 --by <name> # likewise, for a store that publishes it
open-data-store contracts approve filings 1 --by <name> # likewise
open-data-store publish # exit 0 ok · 1 fatal · 3 degraded
publish audits every landed batch again (file checksum, contract, recomputed batch id),
quarantines failures in landing/_quarantine/ with a reason.json, publishes the rest atomically
(one DuckLake snapshot per batch, commit message = batch id) and writes a run report under
reports/publisher/. A batch that hits an infrastructure error (listed under errors, exit 1)
stays in landing/ for the next run, and so do the fact batches behind a failed identity batch,
instead of being quarantined as unknown_entity. Those deferrals are errors entries too (no
separate field): their error text starts with deferred:. Design, security model and gotchas: docs/ARCHITECTURE.md.
Producers may re-emit full history: rows already published with the same values (compared
exactly, so re-emit bit-identical floats) are skipped and counted (skipped_rows in the report,
rows_skipped in ref.batches, where rows counts only the inserted rows); the same key and
known_at with another value quarantines the batch (conflicting_republish). Columns of the
major's first approved definition are compared strictly; columns added by a later minor are compared
only where the published row holds a value (changing it is a conflict), and filling a NULL in one
needs a later known_at to be recorded.
Licence
MIT (code). Each dataset carries its own data licence in its contract.
Metadata
Release files for myopenfund-open-data-store 0.1.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 | Provenance | Actions |
|---|---|---|---|---|
| myopenfund_open_data_store-0.1.0.tar.gz | 80.5 kB | With provenance | Details for myopenfund_open_data_store-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| myopenfund_open_data_store-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for myopenfund_open_data_store-0.1.0-py3-none-any.whl |
Total release size: 122.4 kB
Release files / myopenfund_open_data_store-0.1.0.tar.gz
| Download URL | myopenfund_open_data_store-0.1.0.tar.gz |
|---|---|
| Size | 80.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
01dac2a68d617ea61280ea5d98ca68a7b08f71914cdd3ebd90b1525f8ec87265
|
|
BLAKE2b-256 checksum How to use checksums |
72d5d03062ca329c8522fa13585a223d2ba541a71a7c13e32aed8cc51272a8fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 25, 2026.
Transparency logRelease files / myopenfund_open_data_store-0.1.0-py3-none-any.whl
| Download URL | myopenfund_open_data_store-0.1.0-py3-none-any.whl |
|---|---|
| Size | 41.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8e85193ff71a34d1e08dd91466988d5956cb7a9e3373cc31f1058c56836a811f
|
|
BLAKE2b-256 checksum How to use checksums |
6cb7599d279f3d7cdd15bf4dd0b74353aed73d0be59455117e7a4c7d4aa895ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 25, 2026.
Transparency logSecurity for myopenfund-open-data-store 0.1.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for myopenfund_open_data_store-0.1.0.tar.gz
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 Nov 25, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.