Skip to main content

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

toggly_flask-0.3.0.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

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

toggly_flask-0.3.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

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

Hashes for toggly_flask-0.3.0.tar.gz
Algorithm Hash digest
SHA256 3329a0935e9d597c87d8d74ed9d620b9b0617b10f9d0d883bcfcb173d831ad12
MD5 d52483e125a1658a7417847549657b93
BLAKE2b-256 bd4c72fe3eaa8bc8433732d17f3ae1c7e6c826bc4b7eb1be985fd5954ac8dbe6

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for toggly_flask-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 227bfa304d7fcaf95341348219bc559c324ee75705a6eaa35a4d00a61e15d971
MD5 88b0b2d0700870cb42e921986ba8d751
BLAKE2b-256 2c2d5904433cbbf9279277b856badd89a281560f6f25f6825b43379396a1eeef

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 files

0.2.0

2 files

0.1.0

2 files

0.0.1

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