Registry / data / feast
library0.66.0pypypi✓ verified 24d ago

Feast is an open-source feature store that enables data scientists and engineers to productionize machine learning features. It provides a consistent way to define, manage, and serve features for both model training (historical data) and online inference (low-latency serving). Feast is actively maintained, with new releases typically occurring monthly.

pip install 'feast[local]'
INSTALL
IMPORT
SIG · FEAST
F
feast
datapythonv0.66.0
Install
24.8s avg
Import
12973ms
Disk
548MB
Pass rate
9/ 10
Env Coverage9 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.66.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✓ —
✓ 24.9s
py 3.11
✓ —
✓ 24.3s
py 3.12
✓ —
✓ 22.3s
py 3.13
✓ —
✓ 22.7s
py 3.9
✕ build_error
✓ 29.8s
548MB installed
● package 548MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

FeatureStore
from feast import FeatureStore
Entity
from feast import Entity
FeatureView
from feast import FeatureView
Field
from feast import Field
ValueType
from feast import ValueType
FileSource
from feast.infra.offline_stores.file_source import FileSource
RepoConfig
from feast import RepoConfig
from feast.repo_config import RepoConfig
RepoConfig was directly under feast in older versions (pre-0.20), moved to top-level __init__ in recent versions for convenience.

This quickstart demonstrates how to define entities and feature views, set up a local Feast repository programmatically, and then retrieve both historical and online features. In a typical Feast workflow, `feature_store.yaml` and feature definitions (`feature_repo.py`) are managed as files in a `feature_repo` directory, and the `feast apply` CLI command is used to register them. This example simulates the necessary file structure and programmatic application for a runnable Python script, followed by cleanup.

import pandas as pd import os import shutil from feast import FeatureStore, Entity, FeatureView, Field, ValueType from feast.infra.offline_stores.file_source import FileSource # --- 1. Define feature repository structure and data --- # Create a dummy feature_repo directory for the quickstart repo_path = "feature_repo" if not os.path.exists(repo_path): os.makedirs(repo_path) # Create a dummy feature_store.yaml inside the repo_path with open(os.path.join(repo_path, "feature_store.yaml"), "w") as f: f.write("project: default_project\n") f.write("provider: local\n") f.write("registry: data/registry.db\n") f.write("online_store:\n") f.write(" type: sqlite\n") f.write(" path: data/online_store.db\n") f.write("offline_store:\n") f.write(" type: local\n") # Create dummy data for our feature view user_df = pd.DataFrame({ "user_id": [1001, 1002, 1003, 1004], "age": [25, 30, 22, 35], "city": ["NYC", "SF", "LA", "Chicago"], "event_timestamp": [pd.Timestamp("2023-01-01", tz="UTC"), pd.Timestamp("2023-01-02", tz="UTC"), pd.Timestamp("2023-01-03", tz="UTC"), pd.Timestamp("2023-01-04", tz="UTC")] }) # Simulate writing to a file source within the repo for cleanliness user_data_path = os.path.join(repo_path, "user_data.parquet") user_df.to_parquet(user_data_path) # Define an Entity user = Entity(name="user_id", description="User ID", value_type=ValueType.INT64) # Define an Offline FileSource user_features_source = FileSource( path=user_data_path, timestamp_field="event_timestamp" ) # Define a FeatureView user_feature_view = FeatureView( name="user_profile", entities=[user], ttl=pd.Timedelta(days=365), schema=[ Field(name="age", value_type=ValueType.INT64), Field(name="city", value_type=ValueType.STRING), ], source=user_features_source ) # --- 2. Initialize and apply FeatureStore --- # Initialize FeatureStore by pointing to the repository path fs = FeatureStore(repo_path=repo_path) # Apply (register) the feature definitions programmatically # This simulates `feast apply` CLI command. fs.apply([user, user_feature_view]) # --- 3. Get historical features --- # Create an entity_df for historical feature retrieval entity_df = pd.DataFrame({ "user_id": [1001, 1002, 1003, 1004], "event_timestamp": [pd.Timestamp("2023-01-05", tz="UTC"), pd.Timestamp("2023-01-05", tz="UTC"), pd.Timestamp("2023-01-05", tz="UTC"), pd.Timestamp("2023-01-05", tz="UTC")] }) historical_features = fs.get_historical_features( entity_df=entity_df, feature_views=[user_feature_view], ).to_df() print("Historical features:\n", historical_features) # --- 4. Get online features --- # Before getting online features, you might need to materialize data # to the online store. For 'local' provider with 'sqlite' online store, # materialization populates the sqlite database. fs.materialize_incremental(end_date=pd.Timestamp.now(tz="UTC")) online_features = fs.get_online_features( features=[ "user_profile:age", "user_profile:city" ], entity_rows=[{"user_id": 1001}, {"user_id": 1002}] ).to_dict() print("Online features:\n", online_features) # --- 5. Clean up generated files (optional) --- shutil.rmtree(repo_path)
feast --version
Debug
Known issues
breakingFeast versions, especially in the 0.x series, often introduce breaking changes to the Python API, CLI, and `feature_store.yaml` schema. Always review release notes when upgrading.
fix
Consult the official Feast migration guides for your specific version upgrade (e.g., on the Feast documentation website). Always test upgrades in a staging environment.
affects: All 0.x versions (e.g., 0.1 to 0.62)
gotchaFeast requires provider-specific dependencies for connecting to various offline and online stores (e.g., AWS, GCP, Azure, Spark, Snowflake). These are not installed by default with `pip install feast`.
fix
Install Feast with the required provider group, e.g., `pip install 'feast[aws]'`, `pip install 'feast[gcp]'`, or `pip install 'feast[spark,local]'`. Refer to the Feast documentation for a complete list of provider groups.
affects: All versions
gotchaThe `FeatureStore` constructor expects a `repo_path` pointing to a directory containing `feature_store.yaml` and your feature definition files (`.py`). If not specified, it defaults to the current working directory, which can lead to `FileNotFoundError` or unexpected behavior.
fix
Ensure `feature_store.yaml` is in the directory where your script is run, or explicitly pass `repo_path` to `FeatureStore(repo_path="./my_feature_repo/")`. For production, it's recommended to define a dedicated feature repository directory.
affects: All versions
gotchaFor local development with the 'local' provider, `registry` and `online_store` types (e.g., `sqlite`) should specify persistent file paths in `feature_store.yaml` (e.g., `registry: data/registry.db`, `online_store: type: sqlite`, `path: data/online_store.db`) to avoid losing definitions or online features between sessions.
fix
Explicitly define `path` for file-based `registry` and `online_store` types in your `feature_store.yaml` configuration.
affects: All versions using 'local' provider
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'proto'
This error occurs when the `proto-plus` library, a dependency required for handling Protocol Buffers in Feast, is not installed in the Python environment. This often happens if Feast was installed without specific extras or in an environment where `proto-plus` was not pulled in as a transitive dependency.
fix
Install the missing dependency: `pip install proto-plus jinja2`. Alternatively, ensure you install Feast with the `[ci]` extra if you are setting up a development environment: `pip install 'feast[ci]'`.
AttributeError: 'ValueType' object has no attribute 'to_value_type'
This error typically arises when an outdated or incorrect `ValueType` is used in feature or entity definitions, often due to changes in the Feast API between versions. It indicates an attempt to call a method (`to_value_type`) that no longer exists or is not applicable to the `ValueType` object being used.
fix
Ensure you are importing `ValueType` directly from the `feast` module (e.g., `from feast import ValueType`) and using the correct `ValueType` enumerations (e.g., `ValueType.INT64`) without attempting to convert them from other internal types. Update your Feast SDK to the latest version if using older code.
FeatureViewNotFoundException: Feature view {name} does not exist
This error means that Feast cannot locate the specified feature view (or entity, data source, etc.) in its registry. This commonly happens if `feast apply` has not been executed after defining your feature objects, if there's a typo in the name, or if the feature repository is not correctly configured or accessible.
fix
Run `feast apply` in your feature repository directory to register your feature definitions with the Feast registry. Double-check the spelling of the feature view (or other object) and ensure your `feature_store.yaml` correctly points to your feature definitions.
ModuleNotFoundError: No module named 'sqlite_vec'
This specific `ModuleNotFoundError` occurs when using the SQLite online store with Feast, but the `sqlite-vec` Python package, which is an optional dependency for this functionality, has not been installed in your environment.
fix
Install Feast with the `sqlite` extra to include necessary dependencies: `pip install 'feast[sqlite]'`. If Feast is already installed, you can directly install the missing package: `pip install sqlite-vec`.
Upgrade
Version history
0.66.0latest on PyPI · released Aug 21, 2026
Audit
Dependencies
pythonrequiredRequires Python 3.10.0 or higher.
pyarrowoptionalOften required for data serialization and interaction with data sources, implicitly installed with most providers.
pandasoptionalUsed for feature dataframes, especially in local and testing environments.
Agent activity
30 hits · last 30 days
node
28
OpenAI (training)
1
Resources
feast — pip install feast · libregistry