toggly-flask
Initial context for remote variants
Requires toggly 0.7.0 and toggly-flask 0.3.0 (release pending; these APIs are not in the currently published packages).
from flask import Flask
from toggly_flask import Toggly
app = Flask(__name__)
app.config.update(
TOGGLY_APP_KEY="your-app-key",
TOGGLY_ENABLE_VARIANTS=True,
TOGGLY_IDENTITY="user-123", # Stable variants identity.
TOGGLY_VARIANT_GROUPS=["beta"], # Targeting membership.
TOGGLY_VARIANT_CLAIMS={"plan": "pro"}, # String rule attributes.
)
Toggly(app) # Context is present before the first request.
Startup context avoids an initial variants fetch with incomplete targeting followed by a second fetch. Use one variants client per fixed application-wide context; never change a shared server client's identity for each incoming request. These defaults do not replace request-local EvaluationContext for ordinary local boolean evaluation. Enabling remote variants retains the SDK's existing client-wide evaluated-flag behavior.
Groups are trimmed and sent as repeated parameters. Claims must be string-to-string mappings: empty names/values are omitted, whitespace is preserved, and the first 20 claim names in sorted order are sent. Omitted or empty collections send no targeting parameters. Caller collections are copied. Variants caches and conditional validators match the complete context; legacy unscoped variants caches require a fresh fetch. Global definition caches retain their existing behavior.
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 toggly_flask-0.3.0.tar.gz.
File metadata
- Download URL: toggly_flask-0.3.0.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3329a0935e9d597c87d8d74ed9d620b9b0617b10f9d0d883bcfcb173d831ad12
|
|
| MD5 |
d52483e125a1658a7417847549657b93
|
|
| BLAKE2b-256 |
bd4c72fe3eaa8bc8433732d17f3ae1c7e6c826bc4b7eb1be985fd5954ac8dbe6
|
Provenance
The following attestation bundles were made for toggly_flask-0.3.0.tar.gz:
Publisher:
sdk-python-release.yml on ops-ai/Toggly.FeatureManagement
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
toggly_flask-0.3.0.tar.gz -
Subject digest:
3329a0935e9d597c87d8d74ed9d620b9b0617b10f9d0d883bcfcb173d831ad12 - Sigstore transparency entry: 2787166457
- Sigstore integration time:
-
Permalink:
ops-ai/Toggly.FeatureManagement@f48588fc0479890b311cfe5be29d6b06088c6421 -
Branch / Tag:
refs/heads/develop - Owner: https://github.com/ops-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
sdk-python-release.yml@f48588fc0479890b311cfe5be29d6b06088c6421 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file toggly_flask-0.3.0-py3-none-any.whl.
File metadata
- Download URL: toggly_flask-0.3.0-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
227bfa304d7fcaf95341348219bc559c324ee75705a6eaa35a4d00a61e15d971
|
|
| MD5 |
88b0b2d0700870cb42e921986ba8d751
|
|
| BLAKE2b-256 |
2c2d5904433cbbf9279277b856badd89a281560f6f25f6825b43379396a1eeef
|
Provenance
The following attestation bundles were made for toggly_flask-0.3.0-py3-none-any.whl:
Publisher:
sdk-python-release.yml on ops-ai/Toggly.FeatureManagement
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
toggly_flask-0.3.0-py3-none-any.whl -
Subject digest:
227bfa304d7fcaf95341348219bc559c324ee75705a6eaa35a4d00a61e15d971 - Sigstore transparency entry: 2787166571
- Sigstore integration time:
-
Permalink:
ops-ai/Toggly.FeatureManagement@f48588fc0479890b311cfe5be29d6b06088c6421 -
Branch / Tag:
refs/heads/develop - Owner: https://github.com/ops-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
sdk-python-release.yml@f48588fc0479890b311cfe5be29d6b06088c6421 -
Trigger Event:
workflow_dispatch
-
Statement type: