Dynatrace OpenFeature Provider for Python
The official Dynatrace OpenFeature provider for Python server-side applications.
Status: Early alpha — not yet ready for production use!
Installation
pip install dynatrace-openfeature-provider-python
Usage
from openfeature import api
from openfeature.evaluation_context import EvaluationContext
from dynatrace.openfeature import DynatraceProvider, DynatraceProviderOptions
options = DynatraceProviderOptions.from_sdk_key(
'dt01.server_us_<key>.de848e97..._a1b2c3d4e5'
)
api.set_provider(DynatraceProvider(options))
client = api.get_client()
ctx = EvaluationContext(targeting_key='user-123')
enabled = client.get_boolean_value('my-feature', False, ctx)
# On shutdown:
api.shutdown()
Config origin override (labs / dev environments)
By default the config endpoint is derived from the SDK key. To point the provider at a
different environment or at an SDK proxy, pass config_origin. The value is an origin
only — scheme, host, and optional port, with no path. The provider appends the platform
and key segments itself.
api.set_provider(
DynatraceProvider(sdk_key, config_origin='https://cdn.eu.fm.dynatracelabs.com')
)
Metrics origin override
By default the metrics ingest endpoint is derived from the SDK key. To point
metrics at a different environment or an SDK proxy, pass metrics_origin. The
value is an origin only: scheme, host, and optional port, with no path. The
provider appends /v1/metrics itself.
api.set_provider(
DynatraceProvider(
sdk_key,
metrics_origin='https://metrics.eu.fm.dynatracelabs.com',
)
)
Architecture
The provider performs in-process flag evaluation using flagd-core. On initialization it fetches a flagd-format JSON config from the Dynatrace CDN and polls for updates every 10 seconds. No external bucketing API is called during evaluation.
State transitions follow providers.md §4.1:
NOT_READY → READY → STALE → ERROR, with a 1-minute grace period before STALE → ERROR.
Contributing
See CONTRIBUTING.md.
License
Apache 2.0 — see LICENSE.
Release files for dynatrace-openfeature-provider-python 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dynatrace_openfeature_provider_python-0.2.0.tar.gz | 18.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dynatrace_openfeature_provider_python-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 41.0 kB
Release files / dynatrace_openfeature_provider_python-0.2.0.tar.gz
| Download URL | dynatrace_openfeature_provider_python-0.2.0.tar.gz |
|---|---|
| Size | 18.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c187f4373690c91a3c3203dfe433d2c591a0012ef3160c4f833d6f7e858d8f9f
|
|
BLAKE2b-256 checksum How to use checksums |
994b94a4cd552c329cfcbe59f7df0481c3ffdfdb645976fe314674b57a19d298
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / dynatrace_openfeature_provider_python-0.2.0-py3-none-any.whl
| Download URL | dynatrace_openfeature_provider_python-0.2.0-py3-none-any.whl |
|---|---|
| Size | 22.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fe770547027697ab5e3e565553dadfa267631ff63aa8cbecf13e6fd063344fe6
|
|
BLAKE2b-256 checksum How to use checksums |
7d32192b5fd985c65755c7b09ce0201c20f96ef547303aa0c565e606a01b487b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|