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

CDN base URL override (labs / dev environments)

options = DynatraceProviderOptions.from_sdk_key(sdk_key)

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dynatrace_openfeature_provider_python-0.0.4.tar.gz (17.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file dynatrace_openfeature_provider_python-0.0.4.tar.gz.

File metadata

File hashes

Hashes for dynatrace_openfeature_provider_python-0.0.4.tar.gz
Algorithm Hash digest
SHA256 d8587fb935afe60e2ff6c177f6282f7016896b60bbc40e569a3b37ef1c89bc0b
MD5 1d628d59d8fbc3d92c5215f3e98f55f8
BLAKE2b-256 633d94f4ae47015b32b8e80fede83ea26f1f90bf61fff3aa88dd8477de993cdd

See more details on using hashes here.

File details

Details for the file dynatrace_openfeature_provider_python-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for dynatrace_openfeature_provider_python-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 64ab849a468fc7443cf7afb995c9d96978818ce166444f5deae57d42f336b972
MD5 60a9fade1bc9f9181dc6e09fe7d966ba
BLAKE2b-256 a93f614f2572de644f6b05ab8bc558868f4f5aa793ab9c565b0b1283861a6ef9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page