Metadata-Version: 2.4
Name: envflags
Version: 0.2.0
Summary: Python SDK for envflags
Author: envflags
License: MIT
Project-URL: Homepage, https://envflags.com
Project-URL: Repository, https://github.com/envflags/envflags
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# 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.

```python
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.
