@putnami/python
v0.0.3-b4d16f4
Published
Python integration for hybrid TypeScript/Python applications
Readme
@putnami/python
Python runtime integration for Putnami workspaces (lint, test, serve, run).
Installation
bun add @putnami/pythonFeatures
- Python jobs: lint, test, serve, run
- UV workspace sync: auto-discover Python packages and manage
pyproject.toml - Templates: scaffold Python servers and libraries
Jobs Overview
| Job | Command | Purpose | Documentation |
|-----|---------|---------|---------------|
| Lint | putnami lint | Lint with Ruff | doc/lint.md |
| Test | putnami test | Run pytest (auto-skip if no tests) | doc/test.md |
| Serve | putnami serve | Run a Python server via UV | doc/serve.md |
| Run | putnami run | Run an entrypoint script | doc/run.md |
| Workspace Install | putnami workspace-install | Sync UV workspace + lock | doc/workspace-install.md |
Quick Examples
Scaffold a server
bunx putnami projects create api-server --template python-server --template-extension @putnami/python
bunx putnami workspace-install --force
putnami serve api-server --watchScaffold a library
bunx putnami projects create py-lib --template python-library --template-extension @putnami/pythonLint and test
bunx putnami lint api-server
bunx putnami test api-serverExtension Configuration
Jobs are registered via putnami.extension.json:
{
"commands": {
"lint": "./lint",
"run": "./run",
"test": "./test",
"serve": "./serve",
"workspace-install": "./workspace-install"
}
}Requirements
- Python 3.11+
- UV in PATH
