Python Package Index

local Python Package Index (PyPI)

corelibs-dump-data (1.0.0)

Published 2026-02-02 18:21:37 +09:00 by clemens

Installation

pip install --index-url  --extra-index-url https://pypi.org/simple corelibs-dump-data

About this package

CoreLibs Dump Data

CoreLibs Python Dump Data

This is part of the Python CoreLibs

Overview

Dump variable data in formatted output

Install

uv add --index opj-pypi=https://git.egplusww.jp/api/packages/PyPI/pypi/simple/ corelibs-<project_name>

Usage

The CoreLibs debug support module contains the following

  • corelibs_dump_data.dump_data

corelibs_dump_data.dump_data usage

Formated print of variable values

from corelibs_dump_data.dump_data import dump_data

dump_data

def dump_data(data: Any, use_indent: bool = True) -> str:

Retuns a formatted string for any data, data will be parsed through json dumps.

Note that bad data might throw some json dump exceptions.

Example

from corelibs_debug.dump_data import dump_data

data = {
    "name": "Test",
    "value": 123,
    "items": [1, 2, 3],
    "nested": {"a": 1, "b": 2}
}
print(f"A: {dump_data(data)}")

Example output:

A: {
    "name": "Test",
    "value": 123,
    "items": [
        1,
        2,
        3
    ],
    "nested": {
        "a": 1,
        "b": 2
    }
}

Development

UV setup

uv must be installed

Python venv setup

After clone, run the command below to install all dependenciss

uv sync

Build and Publish

uv build
uv publish --index opj-pypi --token <gitea token>

Python tests

All python tests are the tests/ folder. They are structured by the source folder layout

run them with

uv run pytest

Get a coverate report

uv run pytest --cov=<project>
uv run pytest --cov=<project> --cov-report=term-missing

Other tests

In the test-run folder usage and run tests are located, runt them below

uv run test-run/<script>

Requirements

Requires Python: >=3.13
Details
PyPI
2026-02-02 18:21:37 +09:00
0
Clemens Schwaighofer
5.0 KiB
Assets (2)
Versions (1) View all
1.0.0 2026-02-02