Skip to content

feat: implement-tracking-api-from-python-sdk#35

Draft
Zaimwa9 wants to merge 1 commit intomainfrom
feat/implement-track-analytics
Draft

feat: implement-tracking-api-from-python-sdk#35
Zaimwa9 wants to merge 1 commit intomainfrom
feat/implement-track-analytics

Conversation

@Zaimwa9
Copy link
Copy Markdown
Contributor

@Zaimwa9 Zaimwa9 commented Apr 14, 2026

Resolves #34

Implements the OpenFeature Tracking API using the Flagsmith Python SDK's pipeline analytics (introduced in flagsmith 5.2.0? TBC)

Changes

  • track() method on FlagsmithProvider: maps OpenFeature TrackingEventDetails to client.track_event() custom events
  • guard for backward compatibility with older flagsmith versions
  • _extract_traits() static helper: merges flat attributes and nested traits
  • Flag evaluation events are automatics: handled by the client's get_flag(), no provider changes needed
  • Bumped openfeature-sdk to >=0.9.0 (tracking API support), dropped Python 3.9
  • Updated README with tracking usage example

How did you test this code?

  • Added tests

@Zaimwa9 Zaimwa9 requested a review from a team as a code owner April 14, 2026 13:28
@Zaimwa9 Zaimwa9 requested review from khvn26 and removed request for a team April 14, 2026 13:28
@Zaimwa9 Zaimwa9 marked this pull request as draft April 14, 2026 13:28
max-parallel: 4
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
python-version: ['3.10', '3.11', '3.12']
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While we're at it, would you like to add 3.13 and 3.14 to the matrix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement tracking API

2 participants