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

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.1
File Size Uploaded
dynatrace_openfeature_provider_python-0.1.1.tar.gz 18.2 kB Details

Built distribution (wheel)

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

Total release size: 40.8 kB

Release files / dynatrace_openfeature_provider_python-0.1.1.tar.gz

Download URL dynatrace_openfeature_provider_python-0.1.1.tar.gz
Size 18.2 kB
Tags Source
SHA-256 checksum
How to use checksums
eb380b04ffdedc626118a6dd6eca18afcfff668ce6d341d16253697cbdba7853
BLAKE2b-256 checksum
How to use checksums
b41d493d24119f37ca49ddad710eb2b09b361d3193fe9bc13205c2f3951255f9
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.1-py3-none-any.whl

Download URL dynatrace_openfeature_provider_python-0.1.1-py3-none-any.whl
Size 22.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
39bd7078225fcf2b228753555d8037977520cbfc54ba599b602718f63632839b
BLAKE2b-256 checksum
How to use checksums
12c3befea3002fa3593c173ca64967fa77128763bfcad2839789b3e404c83d64
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

This release

0.1.1 This release

2 release files

0.1.0

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