Hello Lua community,
I'm excited to share Sheets, a high-performance CSV library for Lua built with the goal of bringing modern, production-grade data tooling to the Lua ecosystem.
Lua is one of the most elegant languages I've worked with: minimal, fast, embeddable, and extremely flexible. However, I have often felt that the ecosystem lacks robust tooling in areas like data processing, analytics, and modern developer workflows.
Sheets is my first step toward helping improve that.
Unlike pure-Lua CSV parsers, Sheets uses a hybrid architecture:
- C backend powered by libcsv for fast parsing and writing
- Clean Lua API inspired by Python's csv module
- Cross-platform support via LuaRocks
==================================================
KEY FEATURES
==================================================
- High-performance CSV parsing using libcsv
- Python-style API:
* reader
* writer
* DictReader
* DictWriter
- CSV dialect support:
* Excel
* Excel-Tab
* Unix
* Custom dialects
- CSV Sniffer (delimiter detection)
- Utility functions:
* read_csv
* write_csv
* parse
* filter
* sort
* group_by
* transpose
* column extraction
- Cross-platform support
==================================================
COMPARISON WITH PYTHON CSV MODULE
==================================================
Python:
import csv
with open("data.csv") as f:
reader = csv.reader(f)
for row in reader:
print(row)
Lua (Sheets):
local sheets = require("sheets")
local f = io.open("data.csv")
for row in sheets.reader(f) do
print(row[1], row[2])
end
f:close()
Dict-based reading:
for rec in sheets.DictReader(io.open("data.csv")) do
end
==================================================
INSTALLATION
==================================================
luarocks install sheets
==================================================
PROJECT LINKS
==================================================
GitHub Repository:
LuaRocks Package:
Documentation Website:
==================================================
TESTED ON
==================================================
- Windows
- Linux (WSL / native)
- Termux (Android)
==================================================
VISION
==================================================
This is only the beginning.
My broader goal is to help build serious tooling for Lua in areas such as:
- data processing
- analytics
- numerical computing
- machine learning infrastructure
I believe Lua has tremendous potential beyond scripting and embedding, and I hope projects like this can help strengthen the ecosystem.
I would greatly appreciate feedback, suggestions, bug reports, or contributions from the community.
Thank you.
Best regards,
Shivam Sharma
GitHub: