Skip to main content

The official Dynatrace OpenFeature provider for Python

Project description

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.

Project details


Download files

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

Source Distribution

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.2.tar.gz.

File metadata

File hashes

Hashes for dynatrace_openfeature_provider_python-0.0.2.tar.gz
Algorithm Hash digest
SHA256 1ee10f145f0a72d9a44f72751b8f2b2d282422c078f6447ac928a666e71562ec
MD5 25b0ddd2e59720b330e98e668853c88a
BLAKE2b-256 4f8337d430962f779aeb423e91f3bcbf4a10024f8ce36958f9623efc37dd9f24

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dynatrace_openfeature_provider_python-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3d705314c2ea8dac7aa49d676d3977eb78d4a19b76c8137cfadd0930ba49f34c
MD5 711b580e8842ff626ad3f049ef517075
BLAKE2b-256 39fcdf165842c4077a55beb696a21ad67d235dc657e5f26c2cb245932367a575

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