Eppo Server-Side SDK
raw JSON → 4.4.1 verified Mon Apr 27 auth: no python
Server-side Python SDK for Eppo's feature flagging and experimentation platform. Current version 4.4.1, requires Python >=3.8. Follows semantic versioning; minor releases may introduce breaking changes.
pip install eppo-server-sdk Common errors
error TypeError: __init__() got an unexpected keyword argument 'api_key' ↓
cause Using old positional argument pattern with new Configuration-based constructor.
fix
Wrap api_key in Configuration: EppoClient(Configuration(api_key='...'))
error AttributeError: 'EppoClient' object has no attribute 'get_boolean_assignment' ↓
cause Method removed in v4.0.0.
fix
Use client.get_assignment() and compare result to expected variant string.
Warnings
breaking In v4.0.0, the constructor changed from positional arguments to a Configuration object. Old code using EppoClient(api_key='...') will fail. ↓
fix Use EppoClient(Configuration(api_key='...')).
breaking v4.0.0 removed synchronous methods; get_assignment is now the only method. Methods like get_boolean_assignment no longer exist. ↓
fix Use get_assignment with expected_variant or check assignment value manually.
gotcha The client is not thread-safe. Do not share a single EppoClient instance across threads without external locking. ↓
fix Create separate client instances per thread or use a thread-safe wrapper.
gotcha Configuration caching may cause stale flag evaluations if not configured properly. Default cache TTL is 300 seconds. ↓
fix Set cache_ttl_seconds in Configuration to control refresh interval.
Imports
- EppoClient wrong
from eppo import EppoClientcorrectfrom eppo_client import EppoClient
Quickstart
from eppo_client import EppoClient, Configuration
client = EppoClient(
Configuration(
api_key=os.environ.get('EPPO_API_KEY', '')
)
)
assignment = client.get_assignment(
subject_key='user-1',
flag_key='my-flag',
subject_attributes={'age': 30}
)
print(assignment)