Launchdarkly-server-sdk

Latest version: v9.8.0

Safety actively analyzes 687881 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 15

8.0.0

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."

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](https://docs.launchdarkly.com/sdk/server-side/python/migration-7-to-8).

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.

7.6.1

Fixed:
- Fixed indexing error raised by calling `all_flags_state` while using the `TestData` data source.

7.6.0

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.5.1

Added:
- Publishing this package now includes a pre-built wheel distribution in addition to the customary source distribution.

7.5.0

Added:
- A new `redis_opts` parameter is available when configuring a [Redis feature or Big Segment store](https://launchdarkly-python-sdk.readthedocs.io/en/latest/api-integrations.html#ldclient.integrations.Redis). This parameter will be passed through to the underlying redis driver, allowing for greater configurability. (Thanks, [danie1k](https://github.com/launchdarkly/python-server-sdk/pull/170)!)

Fixed:
- Our previous attempt at adding mypy type checking support missed the inclusion of the required py.typed file. (Thanks, [anentropic](https://github.com/launchdarkly/python-server-sdk/pull/172)!)

7.4.2

Changed:
- Removed upper version restriction on expiringdict. This was originally necessary to allow compatibility with older Python versions which are no longer supported.

Page 3 of 15

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.