Metadata-Version: 2.5
Name: lxj
Version: 0.0.2
Summary: Render rows as an aligned plain-text table.
Project-URL: Homepage, https://github.com/lqxnjk/lxj
Author: lqxnjk
License: MIT
License-File: LICENSE
Keywords: align,console,format,table,text
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# lxj

Turn rows into a table that lines up, without a dependency on `tabulate`.

## Install

```console
pip install lxj
```

## Usage

```python
from lxj import render_table

print(render_table(["name", "n"], [["a", 1], ["beta", 22]]))
# name  n
# ----  --
# a     1
# beta  22

print(render_table(["name", "n"], [["a", 1]], n_align=["left", "right"]))
# name  n
# ---- --
# a      1
```

## Behaviour

| Case | Result |
| --- | --- |
| ragged row | `ValueError` |
| alignment list length mismatch | `ValueError` |
| unknown alignment | `ValueError` |
| trailing spaces | trimmed per line |

Cells are stringified with `str()`; width is measured in characters, so wide
CJK glyphs still count as one column — use a monospace terminal and avoid mixing
scripts in the same column if that matters.

## License

MIT
