A lightweight, zero-infrastructure feature store for machine learning.
Project description
FTLite
FTLite is a batteries-included, local-first feature store for Python that helps you build reproducible machine learning pipelines without Kubernetes, Redis, or cloud infrastructure.
Whether you're training a churn model, fraud detector, recommendation system, or forecasting pipeline, FTLite helps ensure your training features match what would have been available at prediction time—preventing data leakage while keeping the developer experience simple.
Why FTLite?
Modern feature stores are powerful, but often require significant infrastructure and operational overhead.
FTLite is designed for:
- Individual developers
- Researchers
- Students
- Startups
- Small ML teams
- Local-first workflows
No servers.
No Kubernetes.
No metadata databases.
Just Python.
Features
- Lightweight feature definitions
- Point-in-time correct historical feature retrieval
- Offline feature store powered by DuckDB + Parquet
- Online feature store powered by SQLite
- Zero infrastructure setup
- Local feature registry
- Simple Python API
- Fast local development
- Type hints and clean API design
Architecture
+----------------+
| Raw Features |
+----------------+
|
v
+----------------+
| Offline Store |
| DuckDB/Parquet |
+----------------+
|
Historical | Materialize
Feature Joins v
+----------------+
| Online Store |
| SQLite |
+----------------+
|
v
Model Inference
Project Structure
ftlite/
│
├── ftlite/
│ ├── __init__.py
│ ├── feature.py # Entity, Feature, FeatureView, OnDemandFeatureView
│ ├── offline_store.py # DuckDB + temporal ASOF joins
│ ├── online_store.py # SQLite online serving store
│ ├── registry.py # tracks and persists metadata
│ ├── ingestion.py # appends features to Parquet files
│ ├── client.py # main FtliteClient orchestrator
│ └── cli.py # CLI entry point
│
├── tests/
│ ├── __init__.py
│ └── test_client.py
│
├── examples/
│ └── churn_example/
│ ├── __init__.py
│ ├── generate_data.py
│ └── run_churn_store.py
│
├── docs/
│ └── index.md
│
├── pyproject.toml
├── README.md
└── LICENSE
Installation
pip install ftlite
Or install from source:
git clone https://github.com/<your-username>/ftlite.git
cd ftlite
pip install -e .
Quick Example
Define and Register Entity & Features
from ftlite import Entity, Feature, FeatureView, FtliteClient
# Initialize client
client = FtliteClient()
# Define Entity
customer = Entity(
name="customer_id",
value_type="INT64"
)
client.register_entity(customer)
# Define Features and FeatureView
age = Feature(name="age", dtype="int32")
balance = Feature(name="balance", dtype="float64")
fv = FeatureView(
name="customer_fv",
entities=[customer],
features=[age, balance],
source_path="data/customer_features.parquet",
timestamp_field="timestamp"
)
client.register_feature_view(fv)
Historical Features (Point-in-Time Join)
# Join historical features to observation entity data
historical_df = client.get_historical_features(
entity_df=entity_df,
features=[
"customer_fv:age",
"customer_fv:balance"
],
timestamp_col="timestamp"
)
Online Features (Low-Latency Serving)
# Retrieve online features for real-time predictions
online_features = client.get_online_features(
entity_keys=[1001],
features=[
"customer_fv:age",
"customer_fv:balance"
]
)
Detailed Documentation
1. Feature Transformations (On-Demand Feature Views)
On-demand feature views allow you to perform runtime feature transformations using standard Python code, ensuring consistency between training and online serving.
from ftlite import Feature, OnDemandFeatureView
# 1. Define transformation function
def calculate_calls_per_minute(df):
df["calls_per_minute"] = df["support_calls"] / (df["usage_minutes"] + 1)
return df
# 2. Register On-Demand Feature View
ondemand_fv = OnDemandFeatureView(
name="calls_per_minute_transform",
inputs=[
"customer_activity:usage_minutes",
"customer_activity:support_calls"
],
features=[
Feature(name="calls_per_minute", dtype="float64")
],
transform_fn=calculate_calls_per_minute
)
client.register_on_demand_feature_view(ondemand_fv)
2. Ingesting Features
You can ingest new offline feature values dynamically using the push API. It automatically updates local Parquet data storage:
import pandas as pd
new_data = pd.DataFrame({
"customer_id": [1001, 1002],
"timestamp": ["2026-07-14T12:00:00", "2026-07-14T12:00:00"],
"usage_minutes": [145.2, 89.0],
"support_calls": [0, 2],
"active_days_in_week": [5, 3]
})
client.push(feature_view_name="customer_activity", df=new_data)
3. Materializing to Online Store
To use low-latency online feature serving, sync features from the offline store to the SQLite database over a given temporal window:
import datetime
# Sync last 30 days of data
client.materialize(
start_time=datetime.datetime(2026, 6, 1),
end_time=datetime.datetime(2026, 7, 1)
)
4. Feature Versioning & Fallbacks
Define versioned feature views to support model experimentation. Queries automatically resolve to the latest version if no version suffix is provided.
# Define v1 and v2 of a feature view
fv_v1 = FeatureView(
name="customer_fv",
version="v1",
...
)
fv_v2 = FeatureView(
name="customer_fv",
version="v2",
...
)
# Queries resolve to the latest version (v2) by default:
client.get_historical_features(entity_df, ["customer_fv:balance"])
# Or pin to specific versions using either notation:
client.get_historical_features(entity_df, ["customer_fv@v1:balance"])
client.get_historical_features(entity_df, ["customer_fv:balance@v1"])
5. Polars Support
Polars DataFrame integration is available as an optional install extra.
pip install ftlite[polars]
Pass or retrieve Polars relations natively:
# Pass Polars DataFrame and get a Polars DataFrame back
hist_df = client.get_historical_features(
entity_df=polars_entity_df,
features=["customer_fv:balance"],
output_format="polars"
)
6. Point-in-Time Join Caching
Save redundant execution steps by caching point-in-time correct joins locally:
# Enables warm caching. Expired or excess files are self-evicted.
client.get_historical_features(
entity_df,
["customer_fv:balance"],
cache=True,
cache_ttl=86400 # 24 hour TTL (default)
)
Programmatically or via CLI, clear the cache storage:
client.clear_cache()
7. Feature Lineage Tracing
Trace upstream features, intermediate on-demand transform functions, and source parquet files:
lineage = client.get_feature_lineage("calls_per_minute_transform:calls_per_minute")
# Returns a structured dictionary describing the transformation path.
Or trace features interactively via the command line.
8. Command Line Interface (CLI)
FTLite includes a command line utility to inspect your feature registry, clear cached files, and execute materialization commands.
# Initialize registry and workspace directory
ftlite init --registry path/to/registry.json --online-db path/to/online_store.db
# List all registered components
ftlite list --registry path/to/registry.json
# Trace dependency lineage of a feature
ftlite lineage customer_fv:balance
# Clear local parquet cache files
ftlite cache-clear
# Materialize features from the CLI
ftlite materialize \
--registry path/to/registry.json \
--online-db path/to/online_store.db \
--start 2026-06-01T00:00:00 \
--end 2026-07-01T00:00:00
Tech Stack
| Component | Technology |
|---|---|
| Language | Python |
| Offline Store | DuckDB |
| Storage | Parquet |
| Online Store | SQLite |
| Testing | Pytest |
| Formatting | Ruff + Black |
| CI | GitHub Actions |
Example Use Cases
- Customer churn prediction
- Fraud detection
- Recommendation systems
- Credit risk modeling
- Demand forecasting
- Time-series feature engineering
Contributing
Contributions are welcome!
If you'd like to contribute:
- Fork the repository
- Create a feature branch
- Commit your changes
- Open a Pull Request
Please make sure all tests pass before submitting.
Vision
FTLite aims to become the simplest feature store for Python.
Instead of managing infrastructure, developers should spend their time building better machine learning models.
License
MIT License.
⭐ Support the Project
If you find FTLite useful, please consider giving the repository a ⭐ on GitHub. It helps others discover the project and supports future development.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ftlite-0.2.0.tar.gz.
File metadata
- Download URL: ftlite-0.2.0.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8323f3559d4d703bffb1cd4b225dc6e64a3c360f98fe6d6dd14165ae75433d0
|
|
| MD5 |
f90128762ff7490213b0eda182406211
|
|
| BLAKE2b-256 |
e9ff098606531bf952937ba175073a04919c195bc9c44e50850223ae046b602a
|
Provenance
The following attestation bundles were made for ftlite-0.2.0.tar.gz:
Publisher:
publish.yml on chinmay1182/ftlite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ftlite-0.2.0.tar.gz -
Subject digest:
c8323f3559d4d703bffb1cd4b225dc6e64a3c360f98fe6d6dd14165ae75433d0 - Sigstore transparency entry: 2167041937
- Sigstore integration time:
-
Permalink:
chinmay1182/ftlite@cba4f1973689c3c23e85e1b7c834240c7d48016c -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/chinmay1182
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cba4f1973689c3c23e85e1b7c834240c7d48016c -
Trigger Event:
push
-
Statement type:
File details
Details for the file ftlite-0.2.0-py3-none-any.whl.
File metadata
- Download URL: ftlite-0.2.0-py3-none-any.whl
- Upload date:
- Size: 20.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3943aec235d25b19c8cef1dad08f29ac19851a8a2a8016ecd3a6ff885150d3db
|
|
| MD5 |
ee07ac03e3dd9cfeca99aca104132063
|
|
| BLAKE2b-256 |
5321fd34775c07eb1eb6bd372f0d1f165f57eb3cc30a675e0a9a3f78073f5356
|
Provenance
The following attestation bundles were made for ftlite-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on chinmay1182/ftlite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ftlite-0.2.0-py3-none-any.whl -
Subject digest:
3943aec235d25b19c8cef1dad08f29ac19851a8a2a8016ecd3a6ff885150d3db - Sigstore transparency entry: 2167041951
- Sigstore integration time:
-
Permalink:
chinmay1182/ftlite@cba4f1973689c3c23e85e1b7c834240c7d48016c -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/chinmay1182
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cba4f1973689c3c23e85e1b7c834240c7d48016c -
Trigger Event:
push
-
Statement type: