optimizely-sdk
Python SDK for Optimizely Feature Experimentation, Optimizely Full Stack (legacy), and Optimizely Rollouts.
What it is and what it does
Optimizely SDK is a client library for integrating A/B testing and feature management into Python applications. It connects to the Optimizely platform to run experiments, manage feature flags, and control feature rollouts without requiring code redeployment. The SDK can be initialized in multiple ways: with a static datafile, by providing an SDK key for automatic polling updates, or by supplying a custom configuration manager.
The package handles experiment logic, audience targeting, and feature flag evaluation on the client side. It depends on requests for HTTP communication, jsonschema for configuration validation, and supporting libraries like pyrsistent and rpds-py for data structures. It's designed for production use across multiple Python versions and is actively maintained.
Use it for:
- Run A/B tests on new features to measure user engagement and conversion impact before full rollout.
- Manage feature flags to enable or disable features in production without code deployment or restart.
- Gradually roll out new features to a percentage of users to mitigate risk and gather feedback.
- Segment users by audience rules and run targeted experiments on specific user cohorts.
- Integrate experimentation into CI/CD pipelines to validate feature performance automatically.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides A/B testing, feature flagging, and feature management capabilities for Python applications, allowing you to run experiments and control feature rollouts without code deployment.
Yes. The package is production-stable, actively maintained, has low install friction, carries no known vulnerabilities, and uses a permissive Apache license. Install it if you need A/B testing or feature flag management in a Python application and are already using or planning to use the Optimizely platform.
Install
optimizely-sdk on PyPI
pip
pip install optimizely-sdkuv
uv add optimizely-sdkpoetry
poetry add optimizely-sdkInstalling optimizely-sdk
Before you install
Low install friction with a pure-wheel distribution and five well-established runtime dependencies (jsonschema, pyrsistent, requests, idna, rpds-py). Actively maintained with a release 35 days old and recent commits.
License in practice
Licensed under Apache Software License (permissive), meaning you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install optimizely-sdk
import optimizely
# Initialize with an SDK key
client = optimizely.Optimizely(sdk_key='your_sdk_key')
# Or initialize with a datafile
client = optimizely.Optimizely(datafile=datafile_content)
Verify before relying
- Whether the package supports Python 3.8+ as stated in the description, given the classifiers list Python 3.8 through 3.12 but requires_python is unspecified.
- Whether the polling config manager's default update_interval of '5 minutes' is configurable and what the actual default value is in code.
Package facts
| License | not declared (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — jsonschema, pyrsistent, requests, idna, rpds-py |
| Maintenance | actively maintained — 35 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 650,523/month — #5,560 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: optimizely_sdk-5.6.0-py3-none-any.whl
Tags
More Testing packages
Pluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
virtualenvvirtualenv creates isolated Python environments…
permissive · top 100 on PyPI
coverageCoverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
pytest-asynciopytest-asyncio is a pytest plugin that enables…
permissive · top 1,000 on PyPI
pytest-json-ctrfA pytest plugin that generates test reports in…
permissive · top 1,000 on PyPI
statsigStatsig is a Python server SDK for managing…
permissive · top 5,000 on PyPI
eppo-server-sdkServer-side feature flagging and…
permissive · top 15,000 on PyPI
amplitude-experimentProvides server-side A/B testing and feature…
permissive · top 15,000 on PyPI
laboratoryLaboratory lets you safely refactor critical…
permissive · top 15,000 on PyPI
ax-platformAx is a platform for adaptive experimentation…
permissive · top 15,000 on PyPI
posthogPostHog Python SDK integrates product analytics…
permissive · top 1,000 on PyPI
launchdarkly-server-sdkA server-side SDK for integrating…
permissive · top 5,000 on PyPI
django-waffleDjango Waffle provides feature flags (toggles)…
permissive · top 5,000 on PyPI
openfeature-provider-flagsmithConnects the OpenFeature SDK to Flagsmith for…
unclear · top 15,000 on PyPI
growthbookGrowthBook is a feature flagging and A/B…
permissive · top 5,000 on PyPI