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

https://github.com/cootshk/python-tables

Tables from lua, in python
https://github.com/cootshk/python-tables

pypi python python-3 python-3-12 python3 python3-12 python312

Last synced: about 1 month ago
JSON representation

Tables from lua, in python

Awesome Lists containing this project

README

          

# Python-Tables
Implementing tables from Lua into Python 3.12

## Usage

```bash
pip install -U python-tables
```

```py
from tables import Table

tbl = Table()
print(tbl) # <>
tbl.append(1)
tbl["foo"] = "bar"
print(tbl) # <1, foo: 'bar'>

print(repr(tbl)) # Table([1]; {"foo": "bar"})
tbl += [2,3,4]
print(tbl) # <1, 2, 3, 4, foo: 'bar'>
print(tbl == Table(1,2,3,4,foo="bar"))
```