Registry / ai-ml / chalkpy

chalkpy

JSON →
library2.157.6pypypi✓ verified 26d ago

Chalkpy is the Python SDK for Chalk, a feature store designed to simplify feature engineering and deployment for machine learning teams. It allows users to define feature pipelines using familiar Python functions and data structures, orchestrating them on a Rust-based engine for parallel execution. The library facilitates defining features with Pydantic-inspired classes and creating resolvers to compute them for both online inference and offline training. The current version is 2.115.4, with frequent updates indicated by its changelog.

pip install chalkpy
INSTALL
IMPORT
SIG · CHALKPY
C
chalkpy
ai-mlpythonv2.157.6
Install
22.6s avg
Import
2806ms
Disk
666MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v2.157.6 · 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
✕ build_error
✓ 24s
py 3.11
✕ build_error
✓ 21.57s
py 3.12
✕ build_error
✓ 18.23s
py 3.13
✕ build_error
✓ 18.97s
py 3.9
2/3 runs
✓ 30.1s
666MB installed
● package 666MB
Code
Verified usage

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

ChalkClient
✓ from chalk.client import ChalkClient
features
✓ from chalk import features
Used as a decorator to define feature sets.
online
✓ from chalk import online
Used as a decorator to define online feature resolvers.
offline
✓ from chalk import offline
Used as a decorator to define offline feature resolvers.
_
✓ from chalk import _
Used to build features on feature classes, commonly imported as underscore.

This quickstart demonstrates how to initialize the ChalkClient and verify authentication. It requires `CHALK_CLIENT_ID` and `CHALK_CLIENT_SECRET` to be set as environment variables or for the user to have authenticated via the `chalk login` CLI command.

import os from chalk.client import ChalkClient # Ensure these environment variables are set or authenticate via `chalk login` CLI command CHALK_CLIENT_ID = os.environ.get("CHALK_CLIENT_ID", "") CHALK_CLIENT_SECRET = os.environ.get("CHALK_CLIENT_SECRET", "") if not CHALK_CLIENT_ID or not CHALK_CLIENT_SECRET: print("Warning: CHALK_CLIENT_ID and CHALK_CLIENT_SECRET environment variables are not set. Authentication will likely fail. Please refer to Chalk documentation for authentication.") try: client = ChalkClient( client_id=CHALK_CLIENT_ID, client_secret=CHALK_CLIENT_SECRET, branch='notebook' # or 'production', or a custom branch name ) # Verify the setup whoami_response = client.whoami() print(f"Successfully authenticated as user ID: {whoami_response.user_id}") except Exception as e: print(f"Authentication failed or API call error: {e}")
chalk --version
Debug
Known issues
gotchaAuthentication requires `CHALK_CLIENT_ID` and `CHALK_CLIENT_SECRET` environment variables to be set, or prior authentication through the `chalk cli login` command. Failing to do so will result in connection errors.
fix
Set `CHALK_CLIENT_ID` and `CHALK_CLIENT_SECRET` in your environment, or run `chalk login` from the command line and follow the prompts to authenticate.
affects: All versions
gotchaSpecific functionalities require installation with 'extras'. For example, `chalkpy[runtime]` is recommended for notebook environments, and `chalkpy[chalkdf]` is needed for features utilizing Chalk DataFrames. A bare `pip install chalkpy` may not include all necessary components for certain use cases.
fix
Install with the appropriate extras, e.g., `pip install "chalkpy[runtime]"` or `pip install "chalkpy[chalkdf]"`.
affects: All versions
gotchaThe `cache_nulls` parameter for features defaults to `True`, meaning Chalk will cache all values, including nulls. This can lead to unexpected caching behavior if not explicitly handled, as a null value will replace an existing cached value.
fix
Be aware of the `cache_nulls` default behavior. Set `cache_nulls=False` to prevent updating null entries in the cache, or `cache_nulls="evict_nulls"` to evict entries that would have been null.
affects: All versions
Errors
Common errors & fixes
Unexpected Chalk server error with status code 401
This error typically indicates that your Chalk client is unauthenticated, meaning the `CHALK_CLIENT_ID` and `CHALK_CLIENT_SECRET` environment variables are not set correctly, or you haven't authenticated via the `chalk login` CLI command.
fix
Ensure `CHALK_CLIENT_ID` and `CHALK_CLIENT_SECRET` are set in your environment variables, or run `chalk login` in your terminal and follow the prompts to authenticate.

```bash
export CHALK_CLIENT_ID="your_client_id"
export CHALK_CLIENT_SECRET="your_client_secret"
# Or, to log in via CLI
chalk login
```
ModuleNotFoundError: No module named 'chalk'
This error occurs when the `chalkpy` library, or specific modules within it, cannot be found by your Python environment, often due to an incomplete installation or incorrect import paths.
fix
Ensure `chalkpy` is installed in your active Python environment. If you need specific functionalities, install with the appropriate 'extras'.

```bash
pip install chalkpy
# Or for specific functionalities, e.g., for notebooks or Chalk DataFrames:
pip install "chalkpy[runtime]"
pip install "chalkpy[chalkdf]"
```
Please double check that all features have resolvers and resolvers do not have circular dependencies.
This error indicates that Chalk cannot construct a valid dependency graph for resolving features, either because a feature lacks a defined resolver or there's an unbreakable circular dependency in your feature computations.
fix
Review your feature definitions and resolvers to ensure every feature has a corresponding resolver and that no resolver directly or indirectly calls itself in a loop. Reduce the number of output features in your query to isolate the problematic set and debug circular dependencies.
AttributeError: module 'chalk' has no attribute 'ChalkClient' (or similar for other core components)
This usually happens when you try to access a component (like `ChalkClient`, `features`, `online`, `offline`) that is not directly available under the top-level `chalk` module, or there's a version mismatch/corrupted installation.
fix
Ensure you are importing core components from their correct submodules, as specified in the Chalkpy documentation. For `ChalkClient`, it's typically `from chalk.client import ChalkClient`. Other decorators like `features`, `online`, `offline` are often imported directly from `chalk`.

```python
from chalk.client import ChalkClient
from chalk import features, online, offline
```
Upgrade
Version history
2.157.6latest on PyPI · released Aug 28, 2026
Audit
Dependencies
pydanticrequiredUsed for defining features with Pydantic-inspired classes.
requestsrequiredCommon dependency for API interactions, mentioned in quickstart requirements.
chalkdfoptionalRequired for specific features related to Chalk DataFrames.
Agent activity
20 hits · last 30 days
node
18
OpenAI (training)
1
Resources