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.1.tar.gz (22.1 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.1-py3-none-any.whl (19.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ftlite-0.2.1.tar.gz
  • Upload date:
  • Size: 22.1 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.1.tar.gz
Algorithm Hash digest
SHA256 ed7ca36eaaf02683fe3184b19fbf48f5ab75b03cd3a1b62b5a8f9951d1759456
MD5 b53594166ff0abe0b8bb5c3e5812f806
BLAKE2b-256 12617f723459bcdfc10615dd9bfa639d1f74829990578d1cf7fd809c69332ea2

See more details on using hashes here.

Provenance

The following attestation bundles were made for ftlite-0.2.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: ftlite-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 19.7 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b12591bd0f7f1f5ce1c39850d25a38bc0798f91b1d5db564029ee3ea4022f291
MD5 ff35b593350127851f8e76317f89ab02
BLAKE2b-256 cc6c365773a4b8a838e9fefcf4265f385c75969eba15beae3f9d3a0d8f4a7c04

See more details on using hashes here.

Provenance

The following attestation bundles were made for ftlite-0.2.1-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