Skip to main content

Inspect complex data files and nested Python objects with readable summaries.

Project description

PyDataPeekr

PyDataPeekr is a Python tool for inspecting nested data files and complex in-memory objects with readable tree and Markdown output.

Chinese README: docs/README_zh.md

Supported File Extensions

*.pkl *.pickle *.parquet *.json *.jsonl *.csv *.tsv *.yaml *.yml *.npy *.npz

Installation

git clone https://github.com/slkhms777/pydatapeekr.git
cd pydatapeekr
pip install -e .

CLI Usage

Quick Start:

pydatapeekr your_file_path

Show all CLI options:

pydatapeekr --help

Common example:

pydatapeekr your_file.parquet --max-depth 4 --max-dict-items 8 --max-list-items 1

Supported CLI parameters:

  • path Input file path.
  • --max-depth Maximum recursion depth. Default: 4.
  • --max-dict-items Maximum displayed entries for dict-like nodes. Default: 8.
  • --max-list-items Maximum displayed entries for list-like nodes. Default: 1.
  • --show-sample Show sample values for primitive leaf types. Default: False.
  • --format Output format: tree or markdown. Default: tree.
  • --write-to-file [OUTPUT_PATH] Write the result to a file. Default filename: data_info_{file_name}.txt. Supported suffixes: .txt, .md, .markdown.

API Usage

from pydatapeekr import inspect_file, inspect_obj

text = inspect_file(
    "data.json",
    max_depth=4,
    max_dict_items=8,
    max_list_items=1,
    show_sample=False,
    format="tree",
    write_to_file=None,
)

markdown_text = inspect_obj(
    {"user": {"id": 1}, "items": [1, 2, 3]},
    max_depth=4,
    max_dict_items=8,
    max_list_items=1,
    show_sample=True,
    format="markdown",
    write_to_file="report.md",
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pydatapeekr-0.1.0.tar.gz (18.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pydatapeekr-0.1.0-py3-none-any.whl (26.1 kB view details)

Uploaded Python 3

File details

Details for the file pydatapeekr-0.1.0.tar.gz.

File metadata

  • Download URL: pydatapeekr-0.1.0.tar.gz
  • Upload date:
  • Size: 18.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for pydatapeekr-0.1.0.tar.gz
Algorithm Hash digest
SHA256 35c4ff81d13415533cec7dab5f7c4ff686eeb85b79593804a7741d2f639625a6
MD5 6cab3e859a32abff754c68647921b584
BLAKE2b-256 447429bb51228d0ae55f5f8934f55f07c0920067d677f152f3e84ffb695493a9

See more details on using hashes here.

File details

Details for the file pydatapeekr-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pydatapeekr-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 26.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for pydatapeekr-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0f0c6e6da7c9c0ca7db82ab68bc1842560c257e7a78941526d7b832a5dbeed57
MD5 b012864fde092c61c1fafb785edb5e5a
BLAKE2b-256 a9101030f15fc0d508b6472d279fdb65cd6218fcce77efaf051cf3bc4431bbe0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page