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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa04f3e95322a84a31ae007712ac38b46fc66073efb2fb28ef4f9d3a006f4b78
|
|
| MD5 |
0992258631780ebe6768879097614146
|
|
| BLAKE2b-256 |
d48c2596f9d4b19a1ca3118775f9f2644c592f8362dbca2d11ff6774b8d1113f
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3f43565acc99f3d5ea22cafdced49c8a8666d47894ed14a7b35fc48c4cbdd3ce
|
|
| MD5 |
cfeeb7d7c08918abd2f874fd888516e3
|
|
| BLAKE2b-256 |
17e5ff005d57c209c6676ac0137730518f882732ac2a499f1446dca5bd200cd6
|