Structs§
- Async
Flag Poller - Asynchronous poller for feature flag definitions.
- Client
- A
Clientfacilitates interactions with the PostHog API over HTTP. - Client
Options - Configuration options for the PostHog client.
- Client
Options Builder - Builder for
ClientOptions. - Cohort
- A cohort definition for local evaluation.
- Cohort
Definition - Definition of a cohort for local evaluation
- Endpoint
Manager - Manages PostHog API endpoints and host configuration
- Evaluation
Context - Context for evaluating properties that may depend on cohorts or other flags
- Event
- An
Eventrepresents an interaction a user has with your app or website. Examples include button clicks, pageviews, query completions, and signups. See the PostHog documentation for a detailed explanation of PostHog Events. - Feature
Flag - A feature flag definition from PostHog.
- Feature
Flag Condition - A single condition group within a feature flag’s targeting rules.
- Feature
Flag Filters - Targeting rules and configuration for a feature flag.
- Flag
Cache - Thread-safe cache for feature flag definitions.
- Flag
Detail - Detailed information about a feature flag evaluation result.
- Flag
Metadata - Metadata about a feature flag from the PostHog server.
- Flag
Poller - Synchronous poller for feature flag definitions.
- Flag
Reason - Explains why a feature flag evaluated to a particular value.
- Inconclusive
Match Error - Error returned when a feature flag cannot be evaluated locally.
- Local
Evaluation Config - Configuration for local flag evaluation.
- Local
Evaluation Response - Response from the PostHog local evaluation API.
- Local
Evaluator - Evaluates feature flags using locally cached definitions.
- Multivariate
Filter - Configuration for multivariate (A/B/n) feature flags.
- Multivariate
Variant - A single variant in a multivariate feature flag.
- Property
- A property filter used in feature flag targeting.
Enums§
- Client
Options Builder Error - Error type for ClientOptionsBuilder
- Endpoint
- API endpoints for different operations
- Error
- Errors that can occur when using the PostHog client.
- Feature
Flags Response - Response from the PostHog feature flags API.
- Flag
Value - The value of a feature flag evaluation.
Constants§
- DEFAULT_
HOST - Default host (US by default)
- EU_
INGESTION_ ENDPOINT - EU ingestion endpoint
- US_
INGESTION_ ENDPOINT - US ingestion endpoint
Functions§
- capture
- Capture the provided event, sending it to PostHog using the global client.
- client
- This function constructs a new client using the options provided.
- disable_
global disableprevents the global client from being initialized. NOTE: It does not prevent use of the global client once initialized.- global_
is_ disabled is_disabledreturns true if the global client has been disabled. NOTE: A disabled global client can still be used as long as it was initialized before it was disabled.- init_
global init_global_clientwill initialize a globally available client singleton. This singleton can be used when you don’t need more than one instance and have no need to regularly change the client options.- match_
feature_ flag - match_
feature_ flag_ with_ context - Match a feature flag with full context (cohorts, other flags) This version supports cohort membership checks and flag dependency checks
- match_
property_ with_ context - Match a property with additional context for cohorts and flag dependencies