You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(python)!: New python provider with inprocess support (#4861)
* feat(python): New python provider with inprocess support
Signed-off-by: Thomas Poignant <thomas.poignant@gofeatureflag.org>
* move ci to uv
Signed-off-by: Thomas Poignant <thomas.poignant@gofeatureflag.org>
* use read and write wasmtime functions
Signed-off-by: Thomas Poignant <thomas.poignant@gofeatureflag.org>
* fix(python-provider): run async flag resolution in thread via asyncio.to_thread
Async resolve_*_details_async methods now use asyncio.to_thread() to run
sync evaluation in a thread, avoiding event loop blocking. Update test
docstring to match.
* chore(python-provider): remove unused deps (pylru, websocket-client, rel) from pyproject
* fix(python-provider): default unknown flags to trackable in inprocess evaluator
When a flag is not found in _is_trackable, log warning and return True so
unknown flags remain visible in exporters. Update uv.lock.
* feat(python-provider): add WASM store pool for concurrent in-process evaluation
- Add wasm_pool_size option (default 10) to control number of wasmtime Store
instances; Store is not thread-safe, so a pool allows parallel evaluations.
- Refactor EvaluateWasm to use a Queue of Store slots and _create_slot helper.
- InProcessEvaluator passes pool_size into EvaluateWasm (default 4 when unset).
- Add test_evaluate_concurrent_threads to assert concurrent evaluation works.
* chore(python-provider): default wasm pool size to 10
* HEAD
Signed-off-by: Thomas Poignant <thomas.poignant@gofeatureflag.org>
* fix(python-provider): make event_publisher tests deterministic for CI
Co-authored-by: Cursor <cursoragent@cursor.com>
* docs: update AGENTS.md to reflect current codebase structure
The file had several outdated references: phantom ffclient/ directory,
non-existent modules/evaluation, missing providers (PHP, Ruby, Swift),
missing exporters (Logs, OpenTelemetry), incorrect Exporter interface
signature, and missing Makefile targets.
Co-authored-by: Cursor <cursoragent@cursor.com>
* test(python-provider): add in-process evaluation tests
Port the Java InProcessEvaluation test class to Python, exercising
the full provider stack (provider -> InProcessEvaluator -> WASM) with
mock flag configurations for all flag types, disabled flags, error
paths, and scheduled rollouts.
Co-authored-by: Cursor <cursoragent@cursor.com>
* move mock files
Signed-off-by: Thomas Poignant <thomas.poignant@gofeatureflag.org>
* manage all errors
Signed-off-by: Thomas Poignant <thomas.poignant@gofeatureflag.org>
* set as prerelease
Signed-off-by: Thomas Poignant <thomas.poignant@gofeatureflag.org>
* fix: remove @staticmethod from _raise_for_error_code to fix missing 'details' argument
---------
Signed-off-by: Thomas Poignant <thomas.poignant@gofeatureflag.org>
Co-authored-by: Cursor <cursoragent@cursor.com>
OpenFeature Python provider for [GO Feature Flag](https://gofeatureflag.org).
4
+
5
+
## Project Overview
6
+
7
+
This is a Python package that implements the OpenFeature provider interface to connect to a GO Feature Flag relay proxy. It enables Python applications to evaluate feature flags using the OpenFeature SDK.
8
+
9
+
## Architecture
10
+
11
+
```
12
+
gofeatureflag_python_provider/
13
+
├── __init__.py # Package exports
14
+
├── provider.py # Main GoFeatureFlagProvider class (AbstractProvider implementation)
15
+
├── options.py # GoFeatureFlagOptions configuration class
16
+
├── hooks/ # OpenFeature hooks
17
+
│ ├── __init__.py
18
+
│ ├── data_collector.py # Hook for collecting flag evaluation usage data
19
+
│ └── enrich_evaluation_context.py # Hook that adds gofeatureflag metadata to context before evaluation
20
+
├── metadata.py # Provider metadata
21
+
├── request_data_collector.py # Data models for usage collection
22
+
├── request_flag_evaluation.py # Request models for flag evaluation API calls
23
+
└── response_flag_evaluation.py # Response models for flag evaluation API calls
24
+
25
+
tests/
26
+
├── test_gofeatureflag_python_provider.py # Main provider tests
0 commit comments