ni_measurementlink_service
releases/1.4
  • API Reference
ni_measurementlink_service
  • ni_measurementlink_service._featuretoggles
  • Edit on GitHub

ni_measurementlink_service._featuretoggles

MeasurementLink feature toggles.

Module Contents

Classes

CodeReadiness

Indicates whether code is ready to be supported.

FeatureToggle

A run-time feature toggle.

Functions

get_code_readiness_level()

Get the current code readiness level.

requires_feature(feature_toggle)

Decorator specifying that the function requires the specified feature toggle.

Attributes

MULTIPLEXER_SUPPORT_2024Q2

class ni_measurementlink_service._featuretoggles.CodeReadiness[source]

Bases: _OrderedEnum

Indicates whether code is ready to be supported.

RELEASE = 0
NEXT_RELEASE = 1
INCOMPLETE = 2
PROTOTYPE = 3
ni_measurementlink_service._featuretoggles.get_code_readiness_level()[source]

Get the current code readiness level.

You can override this in tests by specifying the use_code_readiness mark.

Return type:

CodeReadiness

exception ni_measurementlink_service._featuretoggles.FeatureNotSupportedError[source]

Bases: Exception

The feature is not supported at the current code readiness level.

class ni_measurementlink_service._featuretoggles.FeatureToggle(name, readiness)[source]

A run-time feature toggle.

Parameters:
  • name (str) –

  • readiness (CodeReadiness) –

property is_enabled: bool

Indicates whether the feature is currently enabled.

You can enable/disable features in tests by specifying the enable_feature_toggle or disable_feature_toggle marks.

Return type:

bool

name: str

The name of the feature.

readiness: CodeReadiness

The code readiness at which this feature is enabled.

ni_measurementlink_service._featuretoggles.requires_feature(feature_toggle)[source]

Decorator specifying that the function requires the specified feature toggle.

Parameters:

feature_toggle (FeatureToggle) –

Return type:

Callable[[Callable[_P, _T]], Callable[_P, _T]]

ni_measurementlink_service._featuretoggles.MULTIPLEXER_SUPPORT_2024Q2

© Copyright 2024, National Instruments. Revision 2ba12c60.

Built with Sphinx using a theme provided by Read the Docs.