runtime = "python" in ubx.iac. ubx generates a __main__.py and a requirements.txt — a standard Python Pulumi project that any Python developer can read, understand, and extend. The .iac source is byte-for-byte identical to the TypeScript example in tutorial 42 — runtime is the only difference. This is the multi-runtime promise: write your infrastructure once in .iac, choose your execution language based on your team’s preferences and existing tooling, not on what the IaC tool supports.
What you’ll learn
- What Python output ubx generates from a
.iacstack - How
runtime = "python"selects the Python compiler target - How the generated Python maps
.iacconstructs to Pulumi Python idioms
Why this matters
Python runtime is the right choice for teams where Python is the primary language — data pipelines, ML platforms, analytics infrastructure. Running Python Pulumi programs means your IaC lives in the same language as your data code, with the same linting, the same CI tooling, the same developer familiarity.
The source code
What ubx generates
TypeScript vs Python — side by side
The same bucket, two languages:Run it
What you learned
runtime = "python" generates __main__.py + requirements.txt + Pulumi.yamlThe
.iac source is identical to the TypeScript version — only ubx.iac changesubx generates idiomatic Python, not a mechanical TypeScript translation
Next steps
Go runtime
The same source compiled to Go
TypeScript runtime
Compare with the TypeScript output
Full runnable example: github.com/ubiquex/ubx-examples/43-runtime-python

