--- id: amplitude-experiment version: "1.12.0" license: MIT License license_treatment: permissive maintenance: active --- # amplitude-experiment — The official Amplitude Experiment Python SDK for server-side instrumentation. License: permissive · Maintenance: active · Downloads: 353.3K/mo ## What it is and what it does The Amplitude Experiment Python SDK is the official server-side library for integrating A/B tests and feature flags into Python applications via Amplitude's Experiment platform. It provides two evaluation modes: remote evaluation, which fetches variant assignments from Amplitude's servers for each user, and local evaluation, which evaluates flags locally after downloading configuration. The SDK handles user context (device ID, user ID, user properties) and returns variant assignments that your code can use to control feature behavior. The package depends on dataclasses-json for serialization, amplitude_analytics for event tracking integration, and sseclient-py for server-sent event streaming in local evaluation mode. It supports Python 3.6 through 3.10 and is actively maintained. Installation is straightforward with no compiled dependencies, making it suitable for containerized and serverless deployments. Use it for: - Run A/B tests on backend logic by fetching variant assignments for users and routing requests accordingly. - Manage feature flags in production with remote evaluation for real-time control without redeployment. - Implement local evaluation mode for low-latency flag decisions when network latency to Amplitude is a concern. - Track experiment exposure and conversion events by integrating flag evaluations with amplitude_analytics. - Segment users by properties (e.g., premium status) and serve different feature variants based on Amplitude-defined rules. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides server-side A/B testing and feature flag evaluation through Amplitude's Experiment platform, supporting both remote and local evaluation modes. Yes. The package is actively maintained, has low install friction, carries no known vulnerabilities, and is MIT-licensed. It's suitable for production use if you're already using Amplitude for analytics and need server-side experiment or feature flag capabilities. Choose it if you want tight integration with Amplitude's platform; if you need a vendor-agnostic feature flag library, consider alternatives. ## Install pip install amplitude-experiment uv add amplitude-experiment poetry add amplitude-experiment ## Installing amplitude-experiment Before you install: Low install friction with a pure Python wheel and only three runtime dependencies. Active maintenance with a recent release 28 days ago and ongoing repository activity. License in practice: MIT License permits commercial and private use with minimal restrictions; suitable for most production deployments. Quickstart: pip install amplitude-experiment from amplitude_experiment import Experiment, User apiKey = 'YOUR-API-KEY' experiment = Experiment.initialize_remote(apiKey) user = User(device_id="abcdefg", user_id="user@company.com") variants = experiment.fetch(user) variant = variants['YOUR-FLAG-KEY'] Requires a valid Amplitude Experiment API key and network access to Amplitude's remote evaluation service. Verify before relying: - Whether local evaluation mode requires downloading and updating flag configurations periodically. - Performance characteristics and latency of remote vs. local evaluation modes under production load. - Exact retry and timeout behavior when Amplitude's remote service is unavailable. ## Package facts - License: MIT License (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 353.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags amplitude experiment sdk, a/b testing python server, feature flags evaluation, remote feature flag evaluation, experiment variant lookup, server-side feature flags, amplitude analytics integration, feature-flags, a-b-testing, amplitude [View on SkillFed](https://skillfed.io/packages/amplitude-experiment) · [View on PyPI](https://pypi.org/project/amplitude-experiment/)