Skip to content

Conversation

@federicobond
Copy link
Member

This PR introduces a new FeatureProvider protocol. Public API methods can use it as an argument type when they want to denote any provider, instead of AbstractProvider which is a bit clunky.

AbstractProvider remains as a provider base class for backward compatibility but it's import path at openfeature.provider.provider does not have the best ergonomics and we should begin working on a migration path before 1.0 is released.

@federicobond federicobond changed the title feat: add FeatureProvider interface feat: add FeatureProvider protocol Feb 2, 2024
@codecov
Copy link

codecov bot commented Feb 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (3b89760) 93.94% compared to head (ec6df50) 94.02%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #268      +/-   ##
==========================================
+ Coverage   93.94%   94.02%   +0.08%     
==========================================
  Files          16       17       +1     
  Lines         446      452       +6     
==========================================
+ Hits          419      425       +6     
  Misses         27       27              
Flag Coverage Δ
unittests 94.02% <100.00%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Federico Bond <federicobond@gmail.com>
Copy link
Member

@gruebel gruebel left a comment

Choose a reason for hiding this comment

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

always love to see more usage of Protocol in Python projects

Co-authored-by: Anton Grübel <anton.gruebel@gmail.com>
Signed-off-by: Federico Bond <federicobond@gmail.com>
@federicobond federicobond merged commit caa7f36 into open-feature:main Feb 3, 2024
@federicobond federicobond deleted the feature-provider branch February 3, 2024 14:26
kikihakiem pushed a commit to ResalApps/openfeature-python-sdk that referenced this pull request Aug 28, 2025
…n-feature#268)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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.

4 participants