Skip to main content

A lightweight, zero-infrastructure feature store for machine learning.

Project description

FTLite

The simplest local-first feature store for Python.

Define features once. Train models without data leakage. Serve features in milliseconds.

No Kubernetes. No Redis. No Cloud. Just Python.

PyPI Version License


Why do I need a Feature Store?

Without FTLite With FTLite
❌ Feature engineering logic is duplicated across train & serve Define features once and reuse them everywhere
❌ Training and inference compute different feature values Ensure consistency between offline & online models
❌ Data leakage silently hurts real-world model performance Prevent data leakage with temporal point-in-time joins
❌ Feature versions are difficult to manage and swap Track lineage & version features out-of-the-box

FTLite vs. Feast

Capability FTLite Feast
Local-first / Zero-infrastructure ⚠️ Complex
Kubernetes Required Often
Redis Required Usually
DuckDB (Offline Joins)
SQLite (Online Serving)
Point-in-Time Joins
Feature Versioning
Zero Setup

Architecture


Installation

pip install ftlite

To enable native Polars DataFrame outputs:

pip install ftlite[polars]

2-Minute Quick Example

1. Define and Register Features

from ftlite import Entity, Feature, FeatureView, FtliteClient

client = FtliteClient()

# Identify entity
customer = Entity(name="customer_id", value_type="INT64")
client.register_entity(customer)

# Define feature view mapping to local Parquet file
fv = FeatureView(
    name="customer_stats",
    entities=[customer],
    features=[
        Feature(name="balance", dtype="double"),
        Feature(name="active_days", dtype="int64")
    ],
    source_path="customer_data.parquet",
    timestamp_field="timestamp"
)
client.register_feature_view(fv)

2. Historical Join (Prevent Data Leakage)

# Pass raw entity observations and timestamps
obs_df = pd.DataFrame({
    "customer_id": [1001],
    "timestamp": ["2026-07-14T12:00:00"]
})

hist_df = client.get_historical_features(
    entity_df=obs_df,
    features=["customer_stats:balance", "customer_stats:active_days"]
)

Visualizing Point-in-Time Join:

Input (Entity Observations):
| customer_id | timestamp           |
| ----------- | ------------------- |
| 1001        | 2026-07-14T12:00:00 |

Output (PIT Correct Joined Features):
| customer_id | timestamp           | customer_stats:balance | customer_stats:active_days |
| ----------- | ------------------- | ---------------------- | -------------------------- |
| 1001        | 2026-07-14T12:00:00 | 5250.75                | 14                         |

3. Materialize & Serve Low-Latency Online Features

import datetime

# Sync last 30 days offline features to SQLite serving store
client.materialize(
    start_time=datetime.datetime(2026, 6, 15),
    end_time=datetime.datetime(2026, 7, 15)
)

# Fetch low-latency prediction features in <1ms
online_features = client.get_online_features(
    entity_keys=[1001],
    features=["customer_stats:balance"]
)
# Returns: [{'entity_id': 1001, 'customer_stats:balance': 5250.75}]

Feature List

  • Point-in-Time Correct Joins: Built on DuckDB temporal ASOF joins to prevent data leakage.
  • Low-Latency Online Serving: SQLite-backed serving engine fetching features in sub-milliseconds.
  • One-Line Feature Versioning: Track feature versions explicitly with automatic fallbacks.
  • Zero-Configuration Caching: Automatically cache historical query computations.
  • Feature Lineage Tracing: View recursive upstream dependencies easily via CLI or Python API.
  • Optional Polars Support: Perform lightning-fast queries with native Polars outputs.
  • Python-First API: Simple object-oriented structures with 100% type annotations.

Complete ML Examples

We provide fully self-contained ML examples inside the examples/ directory:


Detailed Documentation

For comprehensive guides on On-Demand Transformations, versioning patterns, cache management, lineage tracking, and command-line scripts, refer to the Detailed Guide & API Reference.


License

MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ftlite-0.2.2.tar.gz (22.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ftlite-0.2.2-py3-none-any.whl (20.0 kB view details)

Uploaded Python 3

File details

Details for the file ftlite-0.2.2.tar.gz.

File metadata

  • Download URL: ftlite-0.2.2.tar.gz
  • Upload date:
  • Size: 22.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ftlite-0.2.2.tar.gz
Algorithm Hash digest
SHA256 3c79210302f75e39c5563dad5b502d1b309670ae5874c3e77d134ecf702834ba
MD5 269d19b94d28c2c0a50203b72b1a951f
BLAKE2b-256 170e9928149823b84fb66abc0ba59008b6f1986dd5d80ed60897165ac2206ac6

See more details on using hashes here.

Provenance

The following attestation bundles were made for ftlite-0.2.2.tar.gz:

Publisher: publish.yml on chinmay1182/ftlite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ftlite-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: ftlite-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 20.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ftlite-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 606b4af3daa3274829f6b7807bf07045e46d042ba03927dd70fd3510bd9e62d3
MD5 47f745f777490558421cfd510aaf7fd4
BLAKE2b-256 9666662f9972366daffa12be897e974a566c73cb8b43f6e14c4212d71308079a

See more details on using hashes here.

Provenance

The following attestation bundles were made for ftlite-0.2.2-py3-none-any.whl:

Publisher: publish.yml on chinmay1182/ftlite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page