Skip to main content

sleepydatapeek

A quick way to peek at local datafiles.


Welcome to sleepydatapeek!

One often needs to spit out a configurable preview of a data file. It would also be nice if said tool could detect and read several formats automatically.
sleepydatapeek has entered the chat!

Quickly summarize data files of type:

  • csv
  • parquet
  • json
  • pkl
  • xlsx

And glance metadata for files:

  • pdf
  • png
  • jpg|jpeg

ℹ️ Note that this tool presumes format by file extension. If you leave out extensions, or give csv data a .json extension for funsies, then you're being silly.

ℹ️ Due to how metadata formats vary across file types, how metadata is presented varies.


Get Started 🚀


pip install sleepydatapeek
pip install --upgrade sleepydatapeek

python -m sleepydatapeek --help
python -m sleepydatapeek data.csv
python -m sleepydatapeek doc.pdf

Usage ⚙


Set a function in your shell environment to run a script like:

alias datapeek='python -m sleepydatapeek'

Presuming you've named said macro datapeek, print the help message:

$ datapeek data.xlsx

════════════════════ data.xlsx ════════════════════
      Unnamed: 0    CustomerID  ProductName      Quantity  OrderDate      Price
--  ------------  ------------  -------------  ----------  -----------  -------
 0             0           101  Laptop                  2  2023-10-26      1200
 1             1           102  Mouse                   1  2023-10-26        25
 2             2           103  Keyboard                1  2023-10-27        50
 3             3           104  Monitor                 1  2023-10-27       300
 4             4           105  Headphones              3  2023-10-28        80

═══Summary Stats
╭──────────────┬─────────────────╮
│ Index Column  (no_name):int64 │
├──────────────┼─────────────────┤
│ Row Count     30              │
├──────────────┼─────────────────┤
│ Column Count  6               │
├──────────────┼─────────────────┤
│ Memory Usage  < 0.00 bytes    │
╰──────────────┴─────────────────╯

═══Schema
╭─────────────┬────────╮
│ Unnamed: 0   int64  │
├─────────────┼────────┤
│ CustomerID   int64  │
├─────────────┼────────┤
│ ProductName  object │
├─────────────┼────────┤
│ Quantity     int64  │
├─────────────┼────────┤
│ OrderDate    object │
├─────────────┼────────┤
│ Price        int64  │
╰─────────────┴────────╯
═══════════════════════════════════════════════════

Optionally, you can also get group-by counts for distinct values of a given column:

$ datapeek test.xlsx --groupby-count-column=ProductName

# typical output (elided)

═══Groupby Counts
  (row counts for distinct values of ProductName)
╭──────────────┬───╮
│ Laptop        3 │
├──────────────┼───┤
│ Mouse         3 │
├──────────────┼───┤
│ Keyboard      3 │
├──────────────┼───┤
│ Monitor       3 │
├──────────────┼───┤
│ Headphones    3 │
├──────────────┼───┤
│ USB Drive     3 │
├──────────────┼───┤
│ Printer       3 │
├──────────────┼───┤
│ Webcam        3 │
├──────────────┼───┤
│ Speakers      3 │
├──────────────┼───┤
│ External HDD  3 │
╰──────────────┴───╯
═══════════════════════════════════════════════════

You can check metadata for certain file types too:

$ datapeek resume.pdf

📄test.pdf
╭──────────────┬─────────────────────────────────╮
│ CreationDate │ D:20250306111007-06'00'         │
├──────────────┼─────────────────────────────────┤
│ Creator      │ Adobe InDesign 20.1 (Macintosh) │
├──────────────┼─────────────────────────────────┤
│ ModDate      │ D:20250306111048-06'00'         │
├──────────────┼─────────────────────────────────┤
│ Producer     │ Adobe PDF Library 17.0          │
├──────────────┼─────────────────────────────────┤
│ Trapped      │ /False                          │
├──────────────┼─────────────────────────────────┤
│ Length       │ 48 pages                        │
╰──────────────┴─────────────────────────────────╯

Technologies 🧰



Contribute 🤝


If you have thoughts on how to make the tool more pragmatic, submit a PR 😊.

To add support for more data/file types:

  1. append extension name to supported_formats in sleepydatapeek_toolchain.params.py
  2. add detection logic branch to the main function in sleepydatapeek_toolchain/command_logic.py
  3. update this readme

License, Stats, Author 📜


example image tag

PyPI - License PyPI - Version GitHub repo size

See License for the full license text.

This package was authored by Isaac Yep.

Download files

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

Source Distribution

sleepydatapeek-1.6.2.tar.gz (18.2 kB view details)

Uploaded Source

Built Distribution

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

sleepydatapeek-1.6.2-py3-none-any.whl (19.7 kB view details)

Uploaded Python 3

File details

Details for the file sleepydatapeek-1.6.2.tar.gz.

File metadata

  • Download URL: sleepydatapeek-1.6.2.tar.gz
  • Upload date:
  • Size: 18.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.13.2 Darwin/24.4.0

File hashes

Hashes for sleepydatapeek-1.6.2.tar.gz
Algorithm Hash digest
SHA256 a883d1567dc68673c8d688f0ac9e459aacf7adda64f881c660b3d76eb2892fbe
MD5 34fc92dd06de39a63702d9262eb26d06
BLAKE2b-256 f1c012fc5a61f8b8c87f52192e4bdd44264eba1bb87e899f5953aea733b5a1c9

See more details on using hashes here.

File details

Details for the file sleepydatapeek-1.6.2-py3-none-any.whl.

File metadata

  • Download URL: sleepydatapeek-1.6.2-py3-none-any.whl
  • Upload date:
  • Size: 19.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.13.2 Darwin/24.4.0

File hashes

Hashes for sleepydatapeek-1.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a04cb00cc4f4c453f5a5a6a186f5f3c66980fb40b29a9d325989ba4ce9ca1e73
MD5 0e13fc8cbc880717e75553646a12864b
BLAKE2b-256 955af88f24b6e89c45710882e117ca41105dbb6c3a95ea8cb6ec2da7b12279a6

See more details on using hashes here.

Release history Release notifications | RSS feed

2.3.3

2 files

2.3.2

2 files

2.3.1

2 files

2.2.0

2 files

2.1.0

2 files

2.0.0

2 files

1.7.3

2 files

1.7.2

2 files

1.7.1

2 files

1.7.0

2 files

1.6.4

2 files

1.6.3

2 files

This release

1.6.2 This release

2 files

1.5.1

2 files

1.4.1

2 files

1.3.2

2 files

1.3.1

2 files

1.3.0

2 files

1.2.0

2 files

1.1.0

2 files

1.0.6

2 files

1.0.5

2 files

1.0.4

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page