Skip to main content

Render CSV files (including image path columns) into an interactive static HTML viewer.

Project description

viscsv

Interactive CSV viewer for fast table preview, with first-class support for image path columns.

中文文档 / Chinese README

Why viscsv

  • Simple: one command generates a standalone HTML file.
  • Practical: works with plain CSV plus local/remote image paths.
  • Fast for preview: pagination and client-side interactions out of the box.
  • Deploy-free: output is static HTML (and optional sidecar JSON for large datasets).

Features

  • Python API and CLI.
  • Auto-detect image columns or set them explicitly.
  • Search, sorting, grouping, table/grid switch.
  • Sticky table header in data-scroll area.
  • Local image support via relative path + --image-root.
  • Cross-platform path normalization for Linux/macOS/Windows-style inputs.

Installation

pip install viscsv

For local development with uv:

uv venv
uv pip install -e .

Quick Start

CLI

viscsv render data/example.csv -o output/preview.html --image-root images

Common options:

  • --image-root PATH: resolve relative image paths.
  • --image-column NAME: specify image column(s), repeatable.
  • --page-size N: client page size.
  • --title TEXT: viewer title.

Python API

from viscsv import render_csv

render_csv(
    csv_path="data/example.csv",
    output_html="output/preview.html",
    image_root="images",               # optional
    image_columns=["image_url"],       # optional
    page_size=200,
    title="Dataset Preview",
)

Local Image Paths

Two recommended patterns:

  1. CSV uses relative paths + --image-root.
  2. CSV uses absolute paths directly.

Examples:

  • Relative path value: photos/cat01.jpg
  • Windows-style relative value: photos\\cat01.jpg
  • Absolute path value: /Users/alice/Pictures/cat01.jpg
  • Windows absolute value: C:\\Users\\Alice\\Pictures\\cat01.jpg

Large Data Notes

viscsv is optimized for preview workflows. For very large CSV files, prefer:

  • More selective columns.
  • Reasonable --page-size (for example 100-500).
  • Sidecar JSON mode for huge row counts.

License

MIT. See LICENSE.

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

viscsv-0.1.1.tar.gz (17.5 kB view details)

Uploaded Source

Built Distribution

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

viscsv-0.1.1-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

Details for the file viscsv-0.1.1.tar.gz.

File metadata

  • Download URL: viscsv-0.1.1.tar.gz
  • Upload date:
  • Size: 17.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for viscsv-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0f0e701c6873f97a30be72c67e69aae7f657ec4bda167dc6d369cb063eb34251
MD5 10268428a016782db25a13787ed7bcbd
BLAKE2b-256 828fce2a43474f149b304daacd2c7bdb81b587c1cf55a565d5eb28776e62a238

See more details on using hashes here.

File details

Details for the file viscsv-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: viscsv-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 16.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for viscsv-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c5204125a4464b565843fd292acb53b54e74be142c2fecaa5cc5adacda785239
MD5 53b824a9c0d66894c108e86db8e2e5ce
BLAKE2b-256 1361035414e84cca0e0d48c231e246b49a77dfbbe97606053c6c0d9498e9e23a

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