An open API service indexing awesome lists of open source software.

https://github.com/canadaluke888/speedtable

Ultra-fast terminal table renderer written in C
https://github.com/canadaluke888/speedtable

c data datasets fast python python-wrapper python3 tables

Last synced: 27 days ago
JSON representation

Ultra-fast terminal table renderer written in C

Awesome Lists containing this project

README

          

# ⚑ speedtable

**speedtable** is an ultra-fast, C-based terminal table renderer for Python.
Designed for large datasets and low-latency rendering β€” with beautiful Rich-style Unicode output.

> πŸ’‘ Perfect for CLI tools, dataset previews, or any place you need fast + styled tables.

---

## πŸš€ Features

- Blazing-fast C implementation πŸ”₯
- Unicode box-style table formatting (like Rich’s `HEAVY_HEAD`)
- Bold, colored headers with optional column type labels
- Customizable:
- Header color
- Border color
- Body text color
- Type label color
- Title text and color (italicized, centered above the table)

---

## πŸ“¦ Installation

```bash
pip install speedtable
```

---

## πŸ§ͺ Example Usage

```python
import speedtable

table_data = {
"columns": [
{"name": "ID", "type": "int"},
{"name": "Name", "type": "str"},
{"name": "Age", "type": "int"}
],
"rows": [
{"ID": 1, "Name": "Luke", "Age": 21},
{"ID": 2, "Name": "Joe", "Age": 45},
{"ID": 3, "Name": "Alice", "Age": 56}
]
}

print(speedtable.render_table(
table_data,
header_color="green",
border_color="magenta",
body_color="white",
type_color="red",
title_text="Test Table",
title_color="cyan"
))
```

---
## πŸ“· Output
![SpeedTable Demo](https://raw.githubusercontent.com/canadaluke888/speedtable/master/assets/speedtable-demo.png)

---

## 🎨 Supported Color Names

| Name | Description |
|------------------|---------------------------|
| `black` | Standard black |
| `red` | Standard red |
| `green` | Standard green |
| `yellow` | Standard yellow |
| `blue` | Standard blue |
| `magenta` | Standard magenta |
| `cyan` | Standard cyan |
| `white` | Standard white |

> ✨ Headers are always bold, and titles are always italicized.

---

## πŸ’‘ Why speedtable?

The Python `rich` library is beautiful, but may be too slow for rendering large tables in CLI environments.
`speedtable` gives you the same polished aesthetic β€” at native speed.

---

## πŸ“„ License

MIT Β© [Luke Canada](https://github.com/canadaluke888)