Ploomber Core

0.2.27 · active · verified Thu Apr 16

Ploomber-core is a foundational Python library providing common utilities and functionality reused across projects within the Ploomber ecosystem. It includes modules for deprecations, telemetry, exceptions, and validations. As a core component, it supports the main Ploomber library, which is a framework for building modular data pipelines, integrating with Jupyter, and deploying to various platforms like Airflow and Kubernetes. The library is actively maintained, with a current version of 0.2.27, and the broader Ploomber project follows semantic versioning with frequent minor releases.

Common errors

Warnings

Install

Imports

Quickstart

Demonstrates importing a core utility from ploomber-core and initializing its telemetry component, showing how to respect the `PLOOMBER_DO_NOT_TRACK` environment variable.

import os
from ploomber_core.telemetry import Telemetry

# Initialize Telemetry. In a real application, this is often managed by Ploomber's main library.
# The 'do_not_track' setting can be controlled via an environment variable.
telemetry = Telemetry(
    config={'do_not_track': os.environ.get('PLOOMBER_DO_NOT_TRACK', '0') == '1'},
    version='0.2.27' # Typically, this would be `__version__` from the package
)

print(f"Ploomber-core Telemetry initialized (version {telemetry.version}).")
print(f"Telemetry tracking enabled: {not telemetry.do_not_track}")

# Example: In a larger application, you might log events:
# telemetry.log_api_call('some_internal_function')

view raw JSON →