Query features with Chalk's Python client library
The Chalk Python client library (chalkpy) provides a convenient way to query features from your Python applications.
Install chalkpy using pip. Chalkpy currently supports Python 3.10 to 3.13.
pip install chalkpyHere’s a quick example of how to use the Chalk Python client:
from chalk 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)