Skip to main content

data-finder-ts

TypeScript port of data-finder, a model-driven SQL query builder with temporal (milestoned) data support. A Python generator reads mapping definitions and emits strongly-typed TypeScript finder classes.

For runtime usage and query API see FINDERS.md.

Requirements

  • Node ≥ 24
  • uv (Python package manager)

Install

npm install
uv sync       # install Python generator dependencies

Generating finders

Generated files are gitignored — regenerate before running tests on a fresh clone.

npm run generate           # from programmatic mappings (example/mappings.py) → example/generated/
npm run generate:examples  # from all datafinder_examples mappings → tests/generated_examples/

The generator uses the data-finder PyPI package (installed via uv sync).

Running tests

npm test                                  # all tests
npx vitest run tests/duckdb.test.ts       # single file
npm run build                             # type-check only
npm run build:lib                         # build distributable (tsup)

Tests use an in-memory DuckDB instance via @duckdb/node-api.

Defining a mapping (Markdown)

## Model: my_model.md

## DataStore: my_db (Database)

| Scheme           | processing_start | processing_end |
|------------------|------------------|----------------|
| processing_only  | in_z             | out_z          |

### Schema: trading

#### Table: trades → Trade (milestoning: processing_only)

| Column     | Type      | Key | Property |
|------------|-----------|-----|----------|
| sym        | VARCHAR   |     | symbol   |
| price      | DOUBLE    |     | price    |
| account_id | INT       | FK  | account  |
| in_z       | TIMESTAMP |     | valid_from |
| out_z      | TIMESTAMP |     | valid_to   |

#### Association: TradeAccount

| Source Column | Target Table   | Target Column |
|---------------|----------------|---------------|
| account_id    | account_master | ID            |

Load and generate:

from datafinder_examples.finance_mapping import load
from ts_generator.generator import generate

mapping = load('my_mapping.md')
generate(mapping, 'output/')

Metadata

Release files for data-finder-ts-generator 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for data-finder-ts-generator 0.1.4
File Size Uploaded Provenance Actions
data_finder_ts_generator-0.1.4.tar.gz 132.4 kB With provenance Details for data_finder_ts_generator-0.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for data-finder-ts-generator 0.1.4
File Interpreter ABI Platform Actions
data_finder_ts_generator-0.1.4-py3-none-any.whl Python 3 none any Details for data_finder_ts_generator-0.1.4-py3-none-any.whl

Total release size: 149.1 kB

Release files / data_finder_ts_generator-0.1.4.tar.gz

Download URL data_finder_ts_generator-0.1.4.tar.gz
Size 132.4 kB
Tags Source
SHA-256 checksum
How to use checksums
98a0d417517540890405e7566e55dd98c1f3278df1a29f1c8c5c8b29731c9388
BLAKE2b-256 checksum
How to use checksums
856dc9061dbb0a7a455a17c34f5573ed9c9998354e1088ceeb03b5fe69f9fd8e
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 Oct 19, 2026.

Transparency log

Release files / data_finder_ts_generator-0.1.4-py3-none-any.whl

Download URL data_finder_ts_generator-0.1.4-py3-none-any.whl
Size 16.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
faa381e8c788c485c83f002f5334cbcc8f789cd7522e2717d271f5b36089398b
BLAKE2b-256 checksum
How to use checksums
3fbe4e4e6fcfa4e78d8f53959ef3150635cc79be2b70933868c9562f9779f762
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 Oct 19, 2026.

Transparency log

Security for data-finder-ts-generator 0.1.4

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for data_finder_ts_generator-0.1.4.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 Oct 19, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page