Module omnipy.api.protocols.public.config
Overview
View Source
from typing import Protocol
from omnipy.api.enums import (ConfigOutputStorageProtocolOptions,
ConfigPersistOutputsOptions,
ConfigRestoreOutputsOptions)
from omnipy.api.typedefs import LocaleType
class IsEngineConfig(Protocol):
""""""
...
class IsLocalRunnerConfig(IsEngineConfig, Protocol):
""""""
...
class IsPrefectEngineConfig(IsEngineConfig, Protocol):
""""""
use_cached_results: int = False
class IsJobConfig(Protocol):
""""""
output_storage: 'IsOutputStorage'
class IsRootLogConfig(Protocol):
""""""
log_format_str: str
locale: LocaleType
log_to_stdout: bool
log_to_stderr: bool
log_to_file: bool
stdout_log_min_level: int
stderr_log_min_level: int
file_log_min_level: int
file_log_dir_path: str
class IsOutputStorageBase(Protocol):
persist_data_dir_path: str
class IsLocalOutputStorage(IsOutputStorageBase, Protocol):
...
class IsS3OutputStorage(IsOutputStorageBase, Protocol):
endpoint_url: str
access_key: str
secret_key: str
bucket_name: str
class IsOutputStorage(Protocol):
persist_outputs: ConfigPersistOutputsOptions
restore_outputs: ConfigRestoreOutputsOptions
protocol: ConfigOutputStorageProtocolOptions
local: IsLocalOutputStorage
s3: IsS3OutputStorage
Classes
IsEngineConfig
View Source
class IsEngineConfig(Protocol):
""""""
...
IsJobConfig
View Source
class IsJobConfig(Protocol):
""""""
output_storage: 'IsOutputStorage'
IsLocalOutputStorage
Base class for protocol classes.
Protocol classes are defined as::
class Proto(Protocol):
def meth(self) -> int:
...
Such classes are primarily used with static type checkers that recognize structural subtyping (static duck-typing), for example::
class C:
def meth(self) -> int:
return 0
def func(x: Proto) -> int:
return x.meth()
func(C()) # Passes static type check
See PEP 544 for details. Protocol classes decorated with
View Source
class IsLocalOutputStorage(IsOutputStorageBase, Protocol):
...
IsLocalRunnerConfig
View Source
class IsLocalRunnerConfig(IsEngineConfig, Protocol):
""""""
...
IsOutputStorage
Base class for protocol classes.
Protocol classes are defined as::
class Proto(Protocol):
def meth(self) -> int:
...
Such classes are primarily used with static type checkers that recognize structural subtyping (static duck-typing), for example::
class C:
def meth(self) -> int:
return 0
def func(x: Proto) -> int:
return x.meth()
func(C()) # Passes static type check
See PEP 544 for details. Protocol classes decorated with
View Source
class IsOutputStorage(Protocol):
persist_outputs: ConfigPersistOutputsOptions
restore_outputs: ConfigRestoreOutputsOptions
protocol: ConfigOutputStorageProtocolOptions
local: IsLocalOutputStorage
s3: IsS3OutputStorage
IsOutputStorageBase
Base class for protocol classes.
Protocol classes are defined as::
class Proto(Protocol):
def meth(self) -> int:
...
Such classes are primarily used with static type checkers that recognize structural subtyping (static duck-typing), for example::
class C:
def meth(self) -> int:
return 0
def func(x: Proto) -> int:
return x.meth()
func(C()) # Passes static type check
See PEP 544 for details. Protocol classes decorated with
View Source
class IsOutputStorageBase(Protocol):
persist_data_dir_path: str
IsPrefectEngineConfig
View Source
class IsPrefectEngineConfig(IsEngineConfig, Protocol):
""""""
use_cached_results: int = False
Class variables
IsRootLogConfig
View Source
class IsRootLogConfig(Protocol):
""""""
log_format_str: str
locale: LocaleType
log_to_stdout: bool
log_to_stderr: bool
log_to_file: bool
stdout_log_min_level: int
stderr_log_min_level: int
file_log_min_level: int
file_log_dir_path: str
IsS3OutputStorage
Base class for protocol classes.
Protocol classes are defined as::
class Proto(Protocol):
def meth(self) -> int:
...
Such classes are primarily used with static type checkers that recognize structural subtyping (static duck-typing), for example::
class C:
def meth(self) -> int:
return 0
def func(x: Proto) -> int:
return x.meth()
func(C()) # Passes static type check
See PEP 544 for details. Protocol classes decorated with
View Source
class IsS3OutputStorage(IsOutputStorageBase, Protocol):
endpoint_url: str
access_key: str
secret_key: str
bucket_name: str