API Reference¶
Complete API documentation for litestar-flags. This reference covers all public classes, functions, and types available in the library.
Tip
For getting started guides and tutorials, see the Getting Started section. This reference is intended for detailed API lookups.
Core Components¶
The main components you will use most frequently:
Client - The
FeatureFlagClientfor evaluating feature flagsConfiguration - Configuration and plugin setup
Context - The
EvaluationContextfor targeting rules
Decorators¶
Convenient decorators for protecting route handlers:
Decorators -
@feature_flagand@require_flagdecorators
Storage Backends¶
Available storage backend implementations:
Storage Backends - Memory, database, and Redis storage backends
Types and Enums¶
Type definitions and enumerations:
Types and Enums - Flag types, status, operators, and evaluation reasons
Exceptions¶
Exception classes for error handling:
Exceptions - Error classes for feature flag operations
Models¶
Data models for flags, rules, and variants:
Models -
FeatureFlag,FlagRule,FlagVariant, and more