Skip to main content
Version: devel

dlt.common.runtime.collector

NullCollector Objects

class NullCollector(Collector)

View source on GitHub

A default counter that does not count anything.

DictCollector Objects

class DictCollector(Collector)

View source on GitHub

A collector that just counts

LogCollector Objects

class LogCollector(Collector)

View source on GitHub

A Collector that shows progress by writing to a Python logger or a console

__init__

def __init__(log_period: float = 1.0,
logger: Union[logging.Logger, TextIO] = sys.stdout,
log_level: int = logging.INFO,
dump_system_stats: bool = True) -> None

View source on GitHub

Collector writing to a logger every log_period seconds. The logger can be a Python logger instance, text stream, or None that will attach dlt logger

Arguments:

  • log_period float, optional - Time period in seconds between log updates. Defaults to 1.0.
  • logger logging.Logger | TextIO, optional - Logger or text stream to write log messages to. Defaults to stdio.
  • log_level str, optional - Log level for the logger. Defaults to INFO level
  • dump_system_stats bool, optional - Log memory and cpu usage. Defaults to True

maybe_log

def maybe_log() -> None

View source on GitHub

Check if should report and if so, call self.on_log

dump_counters

def dump_counters() -> None

View source on GitHub

Dump all counters to log using the shared formatting methods.

TqdmCollector Objects

class TqdmCollector(Collector)

View source on GitHub

A Collector that shows progress with tqdm progress bars

__init__

def __init__(single_bar: bool = False, **tqdm_kwargs: Any) -> None

View source on GitHub

A Collector that uses tqdm to display counters as progress bars. Set single_bar to True to show just the main progress bar. Pass any config to tqdm in kwargs

AliveCollector Objects

class AliveCollector(Collector)

View source on GitHub

A Collector that shows progress with alive-progress progress bars

__init__

def __init__(single_bar: bool = True, **alive_kwargs: Any) -> None

View source on GitHub

Collector that uses alive_progress to display counters as progress bars. Set single_bar to True to show just the main progress bar. Pass any config to alive_progress in kwargs

EnlightenCollector Objects

class EnlightenCollector(Collector)

View source on GitHub

A Collector that shows progress with enlighten progress and status bars that also allow for logging.

__init__

def __init__(single_bar: bool = False, **enlighten_kwargs: Any) -> None

View source on GitHub

Collector that uses Enlighten to display counters as progress bars. Set single_bar to True to show just the main progress bar. Pass any config to Enlighten in kwargs

This demo works on codespaces. Codespaces is a development environment available for free to anyone with a Github account. You'll be asked to fork the demo repository and from there the README guides you with further steps.
The demo uses the Continue VSCode extension.

Off to codespaces!

DHelp

Ask a question

Welcome to "Codex Central", your next-gen help center, driven by OpenAI's GPT-4 model. It's more than just a forum or a FAQ hub – it's a dynamic knowledge base where coders can find AI-assisted solutions to their pressing problems. With GPT-4's powerful comprehension and predictive abilities, Codex Central provides instantaneous issue resolution, insightful debugging, and personalized guidance. Get your code running smoothly with the unparalleled support at Codex Central - coding help reimagined with AI prowess.