Skip to main content

toggly-fastapi

Initial context for remote variants

Requires toggly 0.7.0 and toggly-fastapi 0.3.0 (release pending; these APIs are not in the currently published packages).

from toggly_fastapi import configure_toggly

configure_toggly(
    app_key="your-app-key",
    enable_variants=True,
    identity="user-123",           # Stable variants identity.
    variant_groups=["beta"],        # Targeting membership.
    variant_claims={"plan": "pro"}, # String rule attributes.
)  # Call during application startup; context precedes 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_fastapi-0.3.0.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

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

toggly_fastapi-0.3.0-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file toggly_fastapi-0.3.0.tar.gz.

File metadata

  • Download URL: toggly_fastapi-0.3.0.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for toggly_fastapi-0.3.0.tar.gz
Algorithm Hash digest
SHA256 22295d1a4f9f7ebb22521d7ecd9d29511e0ec39d36c1ab3fbeb1ac1e64dfd3ae
MD5 61bd218ed23b8d248bbd8f43bd6c2b73
BLAKE2b-256 37f66e2fefa709c63cfab548171ebb65328e541069bfefca2ad28a936f178b5b

See more details on using hashes here.

Provenance

The following attestation bundles were made for toggly_fastapi-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_fastapi-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: toggly_fastapi-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for toggly_fastapi-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 22f9e16b948e16d8c3c9dc464615f2f5d8a1716c6bdda35eacd43f73168b0eb3
MD5 3f505b1e643dc08a45363c6ea90ebc9c
BLAKE2b-256 8dd164cadea5cd46dab5649f627a2e1734c3edf6ffd6b0bf71275e7340470839

See more details on using hashes here.

Provenance

The following attestation bundles were made for toggly_fastapi-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