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",
        False,
        {"key": "user-123", "country": "BE"},
    )
finally:
    flags.close()

Context is optional. Omit it for flags that do not depend on who is asking; pass it last when targeting needs a user.

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.2.0.tar.gz (9.4 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.2.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: envflags-0.2.0.tar.gz
  • Upload date:
  • Size: 9.4 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.2.0.tar.gz
Algorithm Hash digest
SHA256 fa04f3e95322a84a31ae007712ac38b46fc66073efb2fb28ef4f9d3a006f4b78
MD5 0992258631780ebe6768879097614146
BLAKE2b-256 d48c2596f9d4b19a1ca3118775f9f2644c592f8362dbca2d11ff6774b8d1113f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: envflags-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.2 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3f43565acc99f3d5ea22cafdced49c8a8666d47894ed14a7b35fc48c4cbdd3ce
MD5 cfeeb7d7c08918abd2f874fd888516e3
BLAKE2b-256 17e5ff005d57c209c6676ac0137730518f882732ac2a499f1446dca5bd200cd6

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.0

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