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.

Metadata

Release files for toggly-fastapi 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for toggly-fastapi 0.3.1
File Size Uploaded Provenance Actions
toggly_fastapi-0.3.1.tar.gz 14.5 kB With provenance Details for toggly_fastapi-0.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for toggly-fastapi 0.3.1
File Interpreter ABI Platform Actions
toggly_fastapi-0.3.1-py3-none-any.whl Python 3 none any Details for toggly_fastapi-0.3.1-py3-none-any.whl

Total release size: 26.3 kB

Release files / toggly_fastapi-0.3.1.tar.gz

Download URL toggly_fastapi-0.3.1.tar.gz
Size 14.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8c3500fa721eaaca0fecc7c90a8ca725e93444cc9d7a2729530038e873016fa3
BLAKE2b-256 checksum
How to use checksums
41b8a3f7e7d05a57c5e2f375844e04a7d9533cc6f4de0873e1e5106f8d098280
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.

Transparency log

Release files / toggly_fastapi-0.3.1-py3-none-any.whl

Download URL toggly_fastapi-0.3.1-py3-none-any.whl
Size 11.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
610cae26944a4c5f4136bd6293130322b6df9ed033a6324d5650d14e1c931b8a
BLAKE2b-256 checksum
How to use checksums
07fd957f295ea4b784f8c7dcd9687b95da07631b67435720584923061ac766be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.

Transparency log

Security for toggly-fastapi 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for toggly_fastapi-0.3.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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