docs(python): Include async flag cache providers#17066
Merged
Merged
Conversation
Contributor
Deploy preview
|
Contributor
|
Vale prose linter → found 0 errors, 1 warnings, 0 suggestions in your markdown Full report → Copy the linter results into an LLM to batch-fix issues. Linter being weird? Update the rules!
|
| Line | Severity | Message | Rule |
|---|---|---|---|
| 34:71 | warning | Use 'PostHog' instead of 'posthog'. | Vale.Terms |
82c5a0a to
bdff2c7
Compare
marandaneto
reviewed
May 28, 2026
Comment on lines
+18
to
+19
| - [Synchronous Redis cache provider](https://github.com/PostHog/posthog-python/blob/master/examples/redis_flag_cache.py) | ||
| - [Async Redis cache provider](https://github.com/PostHog/posthog-python/blob/master/examples/async_redis_flag_cache.py) for async-first applications using `redis.asyncio` |
Member
There was a problem hiding this comment.
lets use a permlink instead
marandaneto
reviewed
May 28, 2026
| | `on_flag_definitions_received(data)` | Store definitions after a successful API fetch. | `None` or an awaitable resolving to `None` | | ||
| | `shutdown()` | Release locks, close connections, clean up resources. | `None` or an awaitable resolving to `None` | | ||
|
|
||
| > **Note:** All methods may throw errors. The SDK catches and logs them gracefully, ensuring cache provider errors never break flag evaluation. |
Member
There was a problem hiding this comment.
not related to this pr but this is confusing
either the methods throw or not (unless the sdk catch and rethrow?)
marandaneto
approved these changes
May 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
FlagDefinitionCacheProvidermethods can return awaitables.redis.asynciousing the SDK-managed background event loop.Related SDK PR: PostHog/posthog-python#626
Checklist
vercel.json