releases.shpreview
LaunchDarkly/Python SDK

Python SDK

$npx -y @buildinternet/releases show launchdarkly-python-sdk
Mon
Wed
Fri
AprMayJunJulAugSepOctNovDecJanFebMarApr
Less
More
Releases2Avg0/wkVersionsv9.15.0 → v9.15.1
Feb 7, 2023

[7.6.1] - 2023-02-07

Fixed:

  • Fixed indexing error raised by calling all_flags_state while using the TestData data source.
Jan 31, 2023

[8.1.0] - 2023-01-31

Added:

  • Introduced support for an 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.

[7.6.0] - 2023-01-31

Added:

  • Introduced support for an 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.
Dec 30, 2022

[8.0.0] - 2022-12-30

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.

Added:

  • In ldclient, the Context type defines the new context model.
  • For all SDK methods that took a user parameter in the form of a 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.
  • The 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".

Changed (breaking changes from 7.x):

  • It was previously allowable to set a user key to an empty string. In the new context model, the key is not allowed to be empty. Trying to use an empty key will cause evaluations to fail and return the default value.
  • There is no longer such a thing as a 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.
  • The 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.

Changed (requirements/dependencies/build):

  • The minimum Python version is now 3.7.

Changed (behavioral changes):

  • The SDK can now evaluate segments that have rules referencing other segments.
  • Analytics event data now uses a new JSON schema due to differences between the context model and the old user model.
  • Several optimizations within the flag evaluation logic have improved the performance of evaluations. For instance, target lists are now stored internally as sets for faster matching.

Removed:

  • Removed all types, properties, and methods that were deprecated as of the most recent 5.x release.
  • Removed the deprecated ldclient.flag module. This was previously an alternate way to import the EvaluationDetail type; now, you can only import that type from ldclient.evaluation.
  • The alias method no longer exists because alias events are not needed in the new context model.
  • The inline_users_in_events option no longer exists because it is not relevant in the new context model.
Sep 29, 2022

[7.5.1] - 2022-09-29

Added:

  • Publishing this package now includes a pre-built wheel distribution in addition to the customary source distribution.
Jul 1, 2022

[7.5.0] - 2022-07-01

Added:

  • 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 driver, allowing for greater configurability. (Thanks, danie1k!)

Fixed:

  • Our previous attempt at adding mypy type checking support missed the inclusion of the required py.typed file. (Thanks, anentropic!)
Jun 16, 2022

[7.4.2] - 2022-06-16

Changed:

  • Removed upper version restriction on expiringdict. This was originally necessary to allow compatibility with older Python versions which are no longer supported.
Apr 22, 2022

[7.4.1] - 2022-04-22

Added:

Fixed:

  • Fixed invalid operator in key in TestData.
  • Fixed bucketing logic to not treat boolean values as bucketable value types.
Feb 16, 2022

[7.4.0] - 2022-02-16

Added:

  • 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.
Feb 14, 2022

[7.3.1] - 2022-02-14

Added:

  • CI builds now include a cross-platform test suite implemented in https://github.com/launchdarkly/sdk-test-harness. This covers many test cases that are also implemented in unit tests, but may be extended in the future to ensure consistent behavior across SDKs in other areas.

Fixed:

  • The SDK no longer uses the deprecated method threading.Condition.notifyAll(). (Thanks, jdmoldenhauer!)
  • A rule clause that uses a date operator should be considered a non-match, rather than an error, if either value is None.
  • A rule clause that uses a semver operator should be considered a non-match, rather than an error, if either value is not a string.
  • Rules targeting the secondary attribute will now reference the correct value.
  • The identify method should not emit an event if the user key is an empty string.
  • Do not include prereqOf field in event data if it is null. This is done to save on event transfer bandwidth.
  • Data from all_flags_state was always including the flag's version even when it was unnecessary.
  • Any base URIs set in Config will work consistently whether they have trailing slashes or not.
  • When using 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.
  • Data from all_flags_state was always including the flag's version even when it was unnecessary.
Dec 10, 2021

[7.3.0] - 2021-12-10

Added:

Dec 4, 2021

[7.2.1] - 2021-12-03

Changed:

  • Added CI testing for Python 3.10.

Fixed:

  • In streaming mode, the SDK could sometimes fail to receive flag data from LaunchDarkly if the data contained characters that are not in the Basic Latin character set. The error was intermittent and would depend on unpredictable factors of speed and network behavior which could cause the first byte of a multi-byte UTF8 character to be processed before the rest of the bytes had arrived.
  • Fixed some irregularities in the SSE parsing logic used for stream data. The SDK's CI tests now include a more thorough test suite for SSE behavior that is implemented in https://github.com/launchdarkly/sse-contract-tests, to ensure that it is consistent with other LaunchDarkly SDKs.
Jun 17, 2021

[7.2.0] - 2021-06-17

Added:

  • The SDK now supports the ability to control the proportion of traffic allocation to an experiment. This works in conjunction with a new platform feature now available to early access customers.
Mar 12, 2021

[7.1.0] - 2021-03-11

Added:

  • Added the alias method to LDClient. This can be used to associate two user objects for analytics purposes with an alias event.
Feb 23, 2021

[6.13.3] - 2021-02-23

Fixed:

  • 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 GMT.
Feb 19, 2021

[7.0.2] - 2021-02-18

Fixed:

  • 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 GMT.
Nov 26, 2020

[7.0.1] - 2020-11-25

Fixed:

  • The logic for detecting uWSGI did not account for undocumented behavior in some environments where the 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!)
Oct 28, 2020

[7.0.0] - 2020-10-28

This major release is for Python compatibility updates and removal of deprecated APIs. It introduces no new functionality except type hints.

Added:

  • Added type hints to all SDK methods. Python by itself does not enforce these, but commonly used development tools can provide static checking to trigger warnings or errors if the wrong type is used.

Changed:

  • Python 2.7, 3.3, and 3.4 are no longer supported. The minimum Python version is now 3.5.
  • The first parameter to the Config constructor, sdk_key, is now required. Previously it was possible to omit the sdk_key from the Config and specify it separately when initializing the SDK. Now, it is always in the Config.

Removed:

  • Removed ldclient.set_sdk_key(). The correct way to do this now, if you are using the singleton client method ldclient.get(), is to call ldclient.set_config() with a Config object that contains the SDK key.
  • Removed the optional SDK key parameter from the LDClient constructor. You must now provide a configuration parameter of type Config, and set the SDK key within the Config constructor: LDClient(Config(sdk_key = "my-sdk-key", [any other config options])). Previously, it was possible to specify the SDK key as a single string parameter and omit the Config object—LDClient("my-sdk-key")—although this would cause a deprecation warning to be logged; specifying both a key and a Config was always an error.
  • Removed the individual HTTP-related parameters such as connect_timeout from the Config type. The correct way to set these now is with the HTTPConfig sub-configuration object: Config(sdk_key = "my-sdk-key", http = HTTPConfig(connect_timeout = 10)).
  • Removed all other types, parameters, and methods that were deprecated as of the last 6.x release.
Sep 21, 2020

[6.13.2] - 2020-09-21

Fixed:

  • The SDK was not recognizing proxy authorization parameters included in a proxy URL (example: http://username:password@proxyhost:port). It will now use these parameters if present, regardless of whether you set the proxy URL programmatically or in an environment variable. (Thanks, gangeli!)
Jul 13, 2020

[6.13.1] - 2020-07-13

Fixed:

  • A problem with the SDK's use of urllib3.Retry could prevent analytics event delivery from being retried after a network error or server error. (#143)
Latest
9.15.1
Tracking Since
Oct 7, 2015
Last fetched Apr 18, 2026