Skip to main content

envflags Python SDK

The Python SDK downloads an immutable delivery payload, keeps the last known good copy in memory, and evaluates flags locally using the shared v1 spec.

from envflags import create_client

flags = create_client("envflags_server_...").initialize()
try:
    enabled = flags.bool_variation(
        "new-checkout",
        {"key": "user-123", "country": "BE"},
        False,
    )
finally:
    flags.close()

The client polls every 30 seconds and fetches a payload only when its version changes. Set poll_interval=None to refresh manually. Supply a previously persisted payload through bootstrap to remain available when initialization is offline. Refresh failures never replace the last known good payload.

The package supports Python 3.9+ and has no third-party dependencies. evaluate and bucket are exported for applications that manage payload delivery themselves.

Download files

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

Source Distribution

envflags-0.1.0.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

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

envflags-0.1.0-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: envflags-0.1.0.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for envflags-0.1.0.tar.gz
Algorithm Hash digest
SHA256 adcff36e1c7499c1c68de75150c9a3e9a4fd35dfd5d8c7d004a0a12cf28f290d
MD5 15c23e0c084928d454687d3c6451de5a
BLAKE2b-256 fc59f178d7de646cbb6a857fa9ea33e37259cdcd167cc46c6364031f45070bc0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: envflags-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for envflags-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cc5c4fd1c1852b05d4724c5f8ae13264677d85cc79ada622ab1bfbb1d91ca3d0
MD5 51ba7c13535df77cb5127f25c901b88c
BLAKE2b-256 60d7e2e5c5e79c6f043285ac2dd81bbdc8b37c5b72f809cb3324f201015d108f

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.0

2 files

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page