Skip to main content

FlagDrop Python SDK — evaluate feature flags from your cloud bucket

Project description

FlagDrop Python SDK

Feature flag evaluation that runs entirely in your cloud. No vendor servers, no data leaving your infrastructure.

Installation

pip install flagdrop-sdk

Quick Start

from flagdrop import FlagClient

client = FlagClient(
    bucket="my-app-flags",
    environment="production",
    provider="aws",
    region="us-east-1",
)
client.initialize()

# Boolean flag
enabled = client.get_bool("new-checkout", False)

# String flag with targeting context
theme = client.get_string("app-theme", "light", {"plan": "enterprise"})

# Number flag
max_items = client.get_number("max-items", 10)

# JSON flag
config = client.get_json("feature-config", {"limit": 5})

How It Works

  1. You define flags in the FlagDrop dashboard
  2. FlagDrop pushes a JSON config file to an S3 bucket in your AWS account
  3. The SDK reads that file and evaluates flags locally at runtime

No network calls to FlagDrop servers during evaluation. No latency. No single point of failure.

Configuration

Parameter Description
bucket S3 bucket name where flag configs are stored
environment Environment name (e.g., production, staging)
provider Cloud provider (aws)
region AWS region (e.g., us-east-1)
scope Config scope: backend (default) or frontend
refresh_interval_seconds How often to re-fetch config (default: 30s, 0 to disable)

Targeting Rules

The SDK evaluates targeting rules locally. Supported operators:

  • eq, neq — exact match / not equal
  • in, notIn — value in list / not in list
  • lt, gt — less than / greater than (numeric)
  • startsWith, endsWith, contains — string matching
  • segment — segment membership

Rollouts

Percentage-based rollouts use deterministic hashing, so the same user always gets the same result.

Requirements

  • Python 3.9+
  • boto3 (AWS SDK)
  • AWS credentials with read access to your flag config bucket

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flagdrop_sdk-0.1.0.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flagdrop_sdk-0.1.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file flagdrop_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: flagdrop_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for flagdrop_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a3a132c42458334027ea81312aca24c1520f45c5235e74a2be3dca5d84f1a333
MD5 f7b0f7f6e8f138e5ca5196f9105778ed
BLAKE2b-256 78f1ffc8bd1b2d6e61e5bf0f6c218e9737d287ab5dfc2c784e45445afeb89d6e

See more details on using hashes here.

File details

Details for the file flagdrop_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: flagdrop_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for flagdrop_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7a07177d1b705aeb177c0b749ba32226f00b5f260fdf604de1f83fbbab05d833
MD5 565b1c6f31b71b5bd6880127b00b9213
BLAKE2b-256 765a94cbbb4d281e4786fab3da0bf8047595bf7edf13de7087f088372433fea2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page