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
- Host: GitHub
- URL: https://github.com/cootshk/python-tables
- Owner: cootshk
- License: gpl-3.0
- Created: 2023-11-01T04:31:02.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-02T18:50:28.000Z (about 2 years ago)
- Last Synced: 2024-08-09T17:12:55.000Z (over 1 year ago)
- Topics: pypi, python, python-3, python-3-12, python3, python3-12, python312
- Language: Python
- Homepage: https://pypi.org/project/python-tables/
- Size: 62.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
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"))
```