The Chalk Python client library (chalkpy) provides a convenient way to query features from your Python applications.


​
Installation

Install chalkpy using pip. Chalkpy currently supports Python 3.10 to 3.13.

pip install chalkpy

​
Basic Usage

Here’s a quick example of how to use the Chalk Python client:

from chalk.client import ChalkClient

# Initialize the client
client = ChalkClient(
    client_id='your-client-id',
    client_secret='your-client-secret',
    environment='your-environment-id'
)

# Query features
result = client.query(
    input={
        'user.id': 'user123'
    },
    output=[
        'user.credit_score',
        'user.account_age_days'
    ]
)

print(result)

​
Next Steps