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

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.5
File Size Uploaded Provenance Actions
data_finder_ts_generator-0.1.5.tar.gz 230.4 kB With provenance Details for data_finder_ts_generator-0.1.5.tar.gz

Built distribution (wheel)

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

Total release size: 248.5 kB

Release files / data_finder_ts_generator-0.1.5.tar.gz

Download URL data_finder_ts_generator-0.1.5.tar.gz
Size 230.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f459ede25423c5bf58ad94c8dbbce8196eca37004d0a7463b6cf3328596ff086
BLAKE2b-256 checksum
How to use checksums
0002825d79b642fe02e42123d6fdc3d6ddc76e5999c860854447d84f66e4f1f9
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 Oct 31, 2026.

Transparency log

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

Download URL data_finder_ts_generator-0.1.5-py3-none-any.whl
Size 18.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
08ceaafddf2a9af6d7eebf70f7d32a5c574ea63cd6c6bea521d36eefbfa46738
BLAKE2b-256 checksum
How to use checksums
be13deca9379fb9bd7721c66347002235d2d8dccd135be7bedd235b1a94b2422
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 Oct 31, 2026.

Transparency log

Security for data-finder-ts-generator 0.1.5

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.5.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 31, 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