Flaxon 0.3.0 and Teloce-Py 0.3.0 are available on PyPI. Release instructions are maintained on this site; source links identify the framework snapshot. Check version and upgrade guidance.
Flaxon VS Code Extension Cheat Sheet
A quick reference for the most commonly used features of the Flaxon VS Code Extension.
๐ Commands
Open the Command Palette (Ctrl+Shift+P) and run:
| Command | Description |
|---|---|
| Flaxon: Create Project | Create a new Flaxon project |
| Flaxon: Run App | Run the current Flaxon application |
| Flaxon: Debug App | Launch the debugger |
| Flaxon: Generate Route | Create a new route |
| Flaxon: Generate Schema | Generate a validation schema |
| Flaxon: Generate Plugin | Generate a plugin |
| Flaxon: Show Routes | Open the Route Explorer |
| Flaxon: Restart Language Server | Restart the language server |
| Flaxon: Open Documentation | Open the Flaxon documentation |
โจ๏ธ Keyboard Shortcuts
| Shortcut | Action |
|---|---|
Ctrl+Shift+P |
Open Command Palette |
Ctrl+Shift+R |
Show Route Explorer |
Ctrl+Shift+F5 |
Run Flaxon Application |
Ctrl+Shift+U |
Open Output Panel |
Ctrl+Shift+E |
Open Explorer |
Ctrl+S |
Save file (refreshes routes) |
๐ Route Explorer
Displays all discovered routes.
Flaxon Routes
โโโ app.py
โ โโโ GET /
โ โโโ POST /login
โ โโโ GET /users
โโโ api.py
โ โโโ GET /api/posts
โ โโโ POST /api/posts
โโโ admin.py
โโโ GET /admin
Method Colors
| Method | Color |
|---|---|
| GET | ๐ข |
| POST | ๐ |
| PUT | ๐ต |
| DELETE | ๐ด |
| PATCH | ๐ฃ |
| WebSocket | ๐ท |
โก CodeLens
Appears above route handlers.
@app.get("/users")
# โถ Run ๐ Debug ๐ References
async def get_users():
...
Available actions:
- โถ Run
- ๐ Debug
- ๐ Find References
๐ก IntelliSense
Type:
@app.
Suggestions:
get
post
put
delete
patch
websocket
Other completions:
fields.
String
Integer
Float
Boolean
Email
Choice
UUID
DateTime
๐ Snippets
| Trigger | Generates |
|---|---|
froute |
GET Route |
fpost |
POST Route |
fws |
WebSocket Route |
fschema |
Schema |
fvalidation |
Validation Route |
fmiddleware |
Middleware |
fplugin |
Plugin |
ftest |
Test |
Example:
froute + Tab
โ
@app.get("/api/users")
async def get_users(request):
return {"users": []}
๐ Hover Documentation
Hover over:
@app.get@app.postSchemafields.StrFieldHTTPException
to view documentation.
๐ Diagnostics
The extension checks for:
- Missing imports
- Missing
app = Flaxon() - Non-async route handlers
- Missing return values
- Missing WebSocket
accept() - Invalid schemas
- Invalid decorators
โถ Running Your App
Command Palette:
Flaxon: Run App
or
Ctrl+Shift+F5
๐ Debugging
Run:
Flaxon: Debug App
Supports:
- Breakpoints
- Variable inspection
- Watch expressions
- Call stack
- Exceptions
๐ง Generate Code
Available generators:
- Project
- Route
- Schema
- Plugin
โ๏ธ Important Settings
{
"flaxon.entryPoint": "app:app",
"flaxon.enableRouteExplorer": true,
"flaxon.enableCodeLens": true,
"flaxon.enableDiagnostics": true,
"flaxon.enableCompletions": true,
"flaxon.debug.reload": true,
"flaxon.snippets.enable": true
}
๐ Status Bar
| Icon | Meaning |
|---|---|
| โ Flaxon | Ready |
| ๐ Flaxon | Language Server Starting |
| โ Flaxon | Error |
๐ Supported Project Files
The extension activates automatically when it detects:
app.py
main.py
run.py
flaxon.py
๐ Development Workflow
Create Project
โ
โผ
Write Routes
โ
โผ
Use Snippets
โ
โผ
View Route Explorer
โ
โผ
Run Application
โ
โผ
Debug
โ
โผ
Test
โ
โผ
Commit
๐ Troubleshooting
| Problem | Solution |
|---|---|
| Extension not activating | Open a Python file |
| No routes | Save file |
| No CodeLens | Enable flaxon.enableCodeLens |
| No completions | Enable flaxon.enableCompletions |
| LSP stopped | Run Flaxon: Restart Language Server |
| Debug not working | Install the Python extension |
๐ฆ Recommended Extensions
| Extension | Purpose |
|---|---|
| Python | Python support |
| Pylance | IntelliSense |
| GitHub Pull Requests | Git integration |
| Error Lens | Better diagnostics |
| Better Comments | Comment highlighting |
โ Best Practices
- Keep Route Explorer open.
- Use snippets whenever possible.
- Save files frequently.
- Enable diagnostics.
- Restart the Language Server if IntelliSense stops.
- Use CodeLens to run and debug routes quickly.
Quick Reference
| Feature | Shortcut / Command |
|---|---|
| Command Palette | Ctrl+Shift+P |
| Route Explorer | Ctrl+Shift+R |
| Run App | Ctrl+Shift+F5 |
| Output Panel | Ctrl+Shift+U |
| Restart Language Server | Flaxon: Restart Language Server |
| Create Project | Flaxon: Create Project |
Happy coding with Flaxon! ๐