Skip to main content

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')
)

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.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dynatrace-openfeature-provider-python 0.1.0
File Size Uploaded
dynatrace_openfeature_provider_python-0.1.0.tar.gz 18.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dynatrace-openfeature-provider-python 0.1.0
File Interpreter ABI Platform
dynatrace_openfeature_provider_python-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 40.6 kB

Release files / dynatrace_openfeature_provider_python-0.1.0.tar.gz

Download URL dynatrace_openfeature_provider_python-0.1.0.tar.gz
Size 18.1 kB
Tags Source
SHA-256 checksum
How to use checksums
12908d4bf6470ba29eb99c121361d73673a685e0e2de878deea8d92ebbc98de8
BLAKE2b-256 checksum
How to use checksums
f944b3f87a03372faab390e2926d086c04374419d1ee84d052405f1ff12d731c
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.1.0-py3-none-any.whl

Download URL dynatrace_openfeature_provider_python-0.1.0-py3-none-any.whl
Size 22.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d5192cb95aeb1166b0e9a9446ddfbdf4a9f5c9c50aac59ada521b2ad412e783f
BLAKE2b-256 checksum
How to use checksums
a2889b357c30ba74322944cbc562d9d2d90673af210f2e2624c9257e9a3343c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release history Release notifications | RSS feed

0.2.0

2 release files

0.1.1

2 release files

This release

0.1.0 This release

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page