import tempfile
from pathlib import Path
from tinytab import Table
path = Path(tempfile.mkdtemp()) / "menu.csv"
Table({"item": ["coffee", "bagel"], "price": [3.5, 2.25]}).to_csv(path)
print(path.read_text())item,price
coffee,3.5
bagel,2.25
Write the table’s unformatted values to a CSV file.
Usage
path: str | PathSave a table, then read it back with Table.from_csv():