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.
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:
- CSV uses relative paths +
--image-root. - 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 example100-500). - Sidecar JSON mode for huge row counts.
License
MIT. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f0e701c6873f97a30be72c67e69aae7f657ec4bda167dc6d369cb063eb34251
|
|
| MD5 |
10268428a016782db25a13787ed7bcbd
|
|
| BLAKE2b-256 |
828fce2a43474f149b304daacd2c7bdb81b587c1cf55a565d5eb28776e62a238
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5204125a4464b565843fd292acb53b54e74be142c2fecaa5cc5adacda785239
|
|
| MD5 |
53b824a9c0d66894c108e86db8e2e5ce
|
|
| BLAKE2b-256 |
1361035414e84cca0e0d48c231e246b49a77dfbbe97606053c6c0d9498e9e23a
|