Skip to content

feat: Implement Tracking API#35

Merged
Zaimwa9 merged 8 commits intomainfrom
feat/implement-track-analytics
Apr 22, 2026
Merged

feat: Implement Tracking API#35
Zaimwa9 merged 8 commits 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
Comment thread .github/workflows/pytest.yml Outdated
@Zaimwa9 Zaimwa9 marked this pull request as ready for review April 22, 2026 06:46
@khvn26 khvn26 changed the title feat: implement-tracking-api-from-python-sdk feat: Implement Tracking API Apr 22, 2026
Copy link
Copy Markdown
Member

@khvn26 khvn26 left a comment

Choose a reason for hiding this comment

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

Looks good overall — just a handful of comments

Comment thread openfeature_flagsmith/provider.py Outdated
Comment thread openfeature_flagsmith/provider.py Outdated
Comment thread openfeature_flagsmith/provider.py
Copy link
Copy Markdown
Member

@khvn26 khvn26 left a comment

Choose a reason for hiding this comment

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

LGTM

@Zaimwa9 Zaimwa9 merged commit 872bd8c into main Apr 22, 2026
5 checks passed
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