pynenc.conf.config_pynenc

Module Contents

Classes

ArgumentPrintMode

Controls how task arguments are displayed in logs.

ConfigPynenc

Main config of the pynenc app.

API

class pynenc.conf.config_pynenc.ArgumentPrintMode[source]

Bases: enum.StrEnum

Controls how task arguments are displayed in logs.

Variables:
  • FULL – Show complete argument values.

  • KEYS – Show only argument names.

  • TRUNCATED – Show truncated argument values based on configured length.

  • HIDDEN – Hide all argument values.

Initialization

Initialize self. See help(type(self)) for accurate signature.

FULL

‘auto(…)’

KEYS

‘auto(…)’

TRUNCATED

‘auto(…)’

HIDDEN

‘auto(…)’

class pynenc.conf.config_pynenc.ConfigPynenc(config_values: Optional[dict[str, Any]] = None, config_filepath: Optional[str] = None)[source]

Bases: pynenc.conf.config_base.ConfigPynencBase

Main config of the pynenc app.

Variables:
  • app_id (str) – The id of the application.

  • orchestrator_cls (str) – The orchestrator class to use.

  • broker_cls (str) – The broker class to use.

  • state_backend_cls (str) – The state backend class to use.

  • serializer_cls (str) – The serializer class to use.

  • arg_cache_cls (str) – The argument cache class to use.

  • runner_cls (str) – The runner class to use.

  • dev_mode_force_sync_tasks (bool) – If True, forces tasks to run synchronously, useful for development.

  • max_pending_seconds (float) – Maximum time in seconds a task can remain in PENDING state before it expires. See :class:~pynenc.invocation.status.InvocationStatus for more details.

  • logging_level (str) – The logging level of the application (‘info’, ‘warning’, ‘error’, etc.).

  • print_arguments (bool) – If True, prints task arguments in logs. Default False.

  • truncate_arguments_length (int) – Maximum length for printed arguments. If 0, no truncation. Default 100.

  • argument_print_mode (ArgumentPrintMode) – How to print arguments: FULL (all args), KEYS (only names), TRUNCATED (truncated values), HIDDEN (no args). Default TRUNCATED.

  • cached_status_time (float) – Time in seconds to cache invocation status for non-final states. This helps reduce Redis queries by avoiding repeated status checks within this time window. Final statuses are cached indefinitely since they never change. Default 0.1.

Initialization

app_id

‘ConfigField(…)’

orchestrator_cls

‘ConfigField(…)’

broker_cls

‘ConfigField(…)’

state_backend_cls

‘ConfigField(…)’

serializer_cls

‘ConfigField(…)’

arg_cache_cls

‘ConfigField(…)’

runner_cls

‘ConfigField(…)’

dev_mode_force_sync_tasks

‘ConfigField(…)’

max_pending_seconds

‘ConfigField(…)’

logging_level

‘ConfigField(…)’

print_arguments

‘ConfigField(…)’

truncate_arguments_length

‘ConfigField(…)’

argument_print_mode

‘ConfigField(…)’

cached_status_time

‘ConfigField(…)’