get#

RuntimeEnv.get(name: str, default: Any = None, data_class: type | None = None) → Any[source]#

Return the value of a runtime environment field.

Parameters:
  • name (str) – The field name.

  • default (Any) – The value to return if the field isn’t set.

  • data_class (type | None) – A dataclass to convert the field value to. If None, the value is returned as stored.

Returns:

The field value, converted to data_class if one is given, or default if the field isn’t set.

Return type:

Any