NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #1193 most downloaded on PyPI
LaunchDarkly SDK for Python
Last release 9 days ago
25 Sep 2026
Ships fairly regularly
a new release about every 5 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
7 years old
78 releases · first in 2019
Add retry state for RETRY-spec backoff
This PR was generated with Release Please. See documentation.
One column per quarter.
Add async big segment store manager and async Redis adapter
This PR was generated with Release Please. See documentation.
Bump python-eventsource to 1.7.1 to correct pool ownership when closing connections
This PR was generated with Release Please. See documentation.
<!-- CURSOR_SUMMARY -->
Drop persistent-store cache after FDv2 in-memory store init
This PR was generated with Release Please. See documentation.
<!-- CURSOR_SUMMARY -->
Improve fallback behavior when using custom data system configuration
This PR was generated with Release Please. See documentation.
<!-- CURSOR_SUMMARY -->
Mark copy_with_new_sdk_key method as deprecated
$inited key is written (e99a27d)$inited key (e99a27d)This PR was generated with Release Please. See documentation.
<!-- CURSOR_SUMMARY -->
Note: The following breaking changes apply only to FDv2 (Flag Delivery v2) early access features, which are not subject to semantic versioning and may change without a major version bump.
ChangeSetBuilder.finish() method now requires a Selector parameter.DataSystemConfig.synchronizers field now accepts a list of synchronizers, and the ConfigBuilder.synchronizers() method accepts variadic arguments.$inited key is written (e99a27d)$inited key (e99a27d)Remove all synchronizers in daemon mode
This PR was generated with Release Please. See documentation.
<!-- CURSOR_SUMMARY -->
adding data system option to create file datasource intializer
max_connections parameter (#387) (e6395fa), closes #386This PR was generated with Release Please. See documentation.
<!-- CURSOR_SUMMARY -->
Include ldclient.datasystem in docs
This PR was generated with Release Please. See documentation.
<!-- CURSOR_SUMMARY -->
experimental: Release EAP support for FDv2 data system
This PR was generated with Release Please. See documentation.
<!-- CURSOR_SUMMARY -->
Fix overly generic type hint on File data source (#365) (52a7499), closes #364
This PR was generated with Release Please. See documentation.
<!-- CURSOR_SUMMARY -->
Fix incorrect event count in failure message
This PR was generated with Release Please. See documentation.
<!-- CURSOR_SUMMARY -->
Add validation format check for SDK key
This PR was generated with Release Please. See documentation.
<!-- CURSOR_SUMMARY -->
Raise minimum eventsource dep to v1.2.4
Add postfork method to re-initialize after forking
Inline context for custom and migration op events
Add support for payload filtering
## 9.8.1 (2024-12-23) ### Bug Fixes * Close SSE thread on shutdown
Add support for client-side prerequisite events
Skip empty hosts when processing NO_PROXY variable
Add option to omit anonymous users from index and identify events
NO_PROXY environment variable can be used to override HTTP(S)_PROXY values
This release introduces the ability to enable compression of event payloads. When enabled, the SDK will compress events before sending them to the Lau
This release introduces the ability to enable compression of event payloads. When enabled, the SDK will compress events before sending them to the LaunchDarkly servers. This can reduce the bandwidth required to send events, which can be useful in high-traffic environments to reduce egress traffic costs.
[!IMPORTANT] Relay Proxy users MUST upgrade to version 8.9 or higher prior to enabling this option to prevent loss of event data.
However, enabling this feature is NOT required when using the Relay Proxy as it will manage compression automatically.
## 9.4.0 (2024-04-29) ### Features * Add support for hooks
Move tests under ldclient namespace
Correct typehint on Config.update_processor_class (#274) (d386f9c), closes #273
Raise minimum urllib3 package to 1.26.0 (#271) (ffeded9), closes #270
Enable gzip Accept-Encoding header on polling requests
deps: Bump jsonpickle to fix CVE-2020-22083
Replace deprecated utcfromtimestamp usage.
utcfromtimestamp usage.Previously deprecated config options user_cache_size, user_cache_time, user_keys_capacity, user_keys_flush_interval, and private_attribute_names have…
The latest version of this SDK supports the ability to manage migrations or modernizations, using migration flags. You might use this functionality if you are optimizing queries, upgrading to new tech stacks, migrating from one database to another, or other similar technology changes. Migration flags are part of LaunchDarkly's Early Access Program. This feature is available to all LaunchDarkly customers but may undergo additional changes before it is finalized.
For detailed information about this version, refer to the list below. For information on how to upgrade from the previous version, read the migration guide.
Migrator type which provides an out-of-the-box configurable migration framework.migration_variation and track_migration_op methods on LDClient.pyyaml dependency to >=5.3.Context or a dict now only accept a Context.user_cache_size, user_cache_time, user_keys_capacity, user_keys_flush_interval, and private_attribute_names have been removed.variation_for_all_users has been removed.Enable gzip Accept-Encoding header on polling requests
Replace deprecated utcfromtimestamp usage.
utcfromtimestamp usage.Creating an LDContext using the legacy user format has been deprecated and will be removed in the next major release. To learn more, read the Contexts…
LDContext using the legacy user format has been deprecated and will be removed in the next major release. To learn more, read the Contexts documentation.track, identify, variation, variation_detail, all_flags_state, and secure_mode_hash with a context dictionary is deprecated. In the next major release, a Context will be required.Loosened urllib3 requirement to <3
Recoverable errors are logged as a warning not an error. (Thanks, fritzdj!)
Loosened the requirements on the semver package. (Thanks, hauntsaninja!)
Password will be redacted from redis URL prior to logging.
Updated usage of HTTPResponse.getheader to remove deprecation warning from upstream urllib3 package. (Thanks, mnito!)
HTTPResponse.getheader to remove deprecation warning from upstream urllib3 package. (Thanks, mnito!)Pinned urllib3 dependency to <2. (Thanks, prpnmac!)
Fixed indexing error raised by calling all_flags_state while using the TestData data source.
all_flags_state while using the TestData data source.Introduced support for an application config property which sets application metadata that may be used in LaunchDarkly analytics or other product feat
application config property which sets application metadata that may be used in LaunchDarkly analytics or other product features. This does not affect feature flag evaluations.Removed all types, properties, and methods that were deprecated as of the most recent 5.x release.
The latest version of this SDK supports LaunchDarkly's new custom contexts feature. Contexts are an evolution of a previously-existing concept, "users." Contexts let you create targeting rules for feature flags based on a variety of different information, including attributes pertaining to users, organizations, devices, and more. You can even combine contexts to create "multi-contexts."
This feature is only available to members of LaunchDarkly's Early Access Program (EAP). If you're in the EAP, you can use contexts by updating your SDK to the latest version and, if applicable, updating your Relay Proxy. Outdated SDK versions do not support contexts, and will cause unpredictable flag evaluation behavior.
If you are not in the EAP, only use single contexts of kind "user", or continue to use the user type if available. If you try to create contexts, the context will be sent to LaunchDarkly, but any data not related to the user object will be ignored.
For detailed information about this version, please refer to the list below. For information on how to upgrade from the previous version, please read the migration guide.
ldclient, the Context type defines the new context model.dict, you can now pass a Context instead. You can still pass a dict containing user properties, in which case the SDK will convert it to a Context transparently; however, Context is preferable if you value efficiency since there is some overhead to this conversion.TestData flag builder methods have been extended to support now context-related options, such as matching a key for a specific context type other than "user".secondary meta-attribute that affects percentage rollouts. If you set an attribute with that name in a Context, it will simply be a custom attribute like any other.anonymous attribute is now a simple boolean, with no distinction between a false state and a null/undefined state. Previously, a flag rule like anonymous is false would not match if the attribute was undefined, but now undefined is treated the same as false.ldclient.flag module. This was previously an alternate way to import the EvaluationDetail type; now, you can only import that type from ldclient.evaluation.alias method no longer exists because alias events are not needed in the new context model.inline_users_in_events option no longer exists because it is not relevant in the new context model.Fixed indexing error raised by calling all_flags_state while using the TestData data source.
all_flags_state while using the TestData data source.Introduced support for an application config property which sets application metadata that may be used in LaunchDarkly analytics or other product feat
application config property which sets application metadata that may be used in LaunchDarkly analytics or other product features. . This does not affect feature flag evaluations.Publishing this package now includes a pre-built wheel distribution in addition to the customary source distribution.
A new redis_opts parameter is available when configuring a Redis feature or Big Segment store. This parameter will be passed through to the underlying
redis_opts parameter is available when configuring a Redis feature or Big Segment store. This parameter will be passed through to the underlying redis driver, allowing for greater configurability. (Thanks, danie1k!)Removed upper version restriction on expiringdict. This was originally necessary to allow compatibility with older Python versions which are no longer
Added py.typed file to indicate typing support. Thanks @phillipuniverse
TestData, in the new module ldclient.integrations.test_data, is a new way to inject feature flag data programmatically into the SDK for testing—either
TestData, in the new module ldclient.integrations.test_data, is a new way to inject feature flag data programmatically into the SDK for testing—either with fixed values for each flag, or with targets and/or rules that can return different values for different users. Unlike the file data source, this mechanism does not use any external resources, only the data that your test code has provided.The SDK no longer uses the deprecated method threading.Condition.notifyAll(). (Thanks, jdmoldenhauer!)
threading.Condition.notifyAll(). (Thanks, jdmoldenhauer!)None.secondary attribute will now reference the correct value.identify method should not emit an event if the user key is an empty string.prereqOf field in event data if it is null. This is done to save on event transfer bandwidth.all_flags_state was always including the flag's version even when it was unnecessary.Config will work consistently whether they have trailing slashes or not.all_flags_state to produce bootstrap data for the JavaScript SDK, the Python SDK was not returning the correct metadata for evaluations that involved an experiment. As a result, the analytics events produced by the JavaScript SDK did not correctly reflect experimentation results.all_flags_state was always including the flag's version even when it was unnecessary.The SDK now supports evaluation of Big Segments. See: https://docs.launchdarkly.com/home/users/big-segments
Added CI testing for Python 3.10.
The SDK now supports the ability to control the proportion of traffic allocation to an experiment. This works in conjunction with a new platform featu
Added the alias method to LDClient. This can be used to associate two user objects for analytics purposes with an alias event.
alias method to LDClient. This can be used to associate two user objects for analytics purposes with an alias event.The SDK could fail to send debug events when event debugging was enabled on the LaunchDarkly dashboard, if the application server's time zone was not
The logic for detecting uWSGI did not account for undocumented behavior in some environments where the uwsgi module is present in an incomplete state;
uwsgi module is present in an incomplete state; this could cause an error on startup in such environments. Also, the log message about threading options related to uWSGI contained a broken link. (Thanks, andrefreitas!)Your coding agent can read these notes before it upgrades. Set up the MCP server →