tpyEdit
FeaturesSpreadsheet view for
|
| Button | Action |
|---|---|
+ linha |
Add a row at the end |
– linha |
Remove a row (prompts for row number) |
+ coluna |
Add a column (prompts for name) |
– coluna |
Remove a column |
Rename a column: double-click any column header.
Variable management
Use the global toolbar to:
+ var— create a new variable– var— delete a variable (with confirmation)renomear var— rename a variable
AI-generated files supported
tpy tolerates inline comments inside lists and dicts — common in AI-generated .t.py files — without breaking the parser.
Live diagnostics
Errors in .t.py files appear as red squiggles in the text editor, with hover messages and problem panel integration.
Theme support
tpy follows your VS Code theme automatically. You can also pin it:
"tpy.theme": "auto" // "auto" | "light" | "dark"
File format
.t.py files contain standard Python: imports, module docstrings, and list[dict] variable assignments with homogeneous dicts (same keys, same order across all rows):
import pandas as pd
from datetime import date
sales = [
{"date": date(2024, 1, 1), "region": "SP", "revenue": 1200},
{"date": date(2024, 1, 2), "region": "RJ", "revenue": 980},
]
targets = [
{"region": "SP", "goal": 1500},
{"region": "RJ", "goal": 1000},
]
Empty variables preserve their schema via a sentinel comment:
empty = [] # tpy:cols=["col_a","col_b"]
tpy produces Black-compatible output — running Black on a saved .t.py file is a no-op.
Requirements
VS Code 1.85 or later (or Cursor).
Extension Settings
| Setting | Default | Description |
|---|---|---|
tpy.theme |
"auto" |
Color theme: "auto" follows VS Code, "light" or "dark" to pin |