Python support is experimental in 1.6.0. Elide runs Python 3.13 with its standard library; it does not install PyPI
packages, format Python, or run Python tests under elide test.
| Task | Command | Status |
|---|---|---|
| Add Python to an install | elide setup python | Available |
Run a script, -c or -m | elide python ..., elide run app.py | Available |
Run a pyproject.toml entry point | elide run NAME | Available |
| Use packages from a virtual environment | VIRTUAL_ | Available |
| Run unittest or pytest | elide python -m unittest, elide python -m pytest | Available |
| Install PyPI packages | elide install | Not available; use a virtual environment |
| Discover Python tests | elide test | Not available |
Format, LSP, elide init template | Not available |
Add Python
Python is an optional component:
elide setup pythonWithout it, Python commands print Python support is not installed. Run 'elide setup python' to add it. and exit 2.
See Python with Elide for channels and package-manager installs.
Run Python
elide python takes the same arguments as python; elide run and a bare elide app.py run .py files too:
elide python app.py --name Elide
elide python -m json.tool input.json
elide run app.pyInterpreter flags (-I, -B, -u, -W, …) are listed in Python with Elide.
Run project scripts
elide run NAME runs a [project.scripts] entry point from the pyproject.toml in the current directory. No
elide.pkl is needed.
# pyproject.toml
[project]
name = "greet"
version = "0.1.0"
requires-python = ">=3.13"
[project.scripts]
greet = "greet.cli:main"# greet/cli.py
import sys
def greeting(name: str) -> str:
return f"Hello, {name}!"
def main() -> int:
print(greeting(sys.argv[1] if len(sys.argv) > 1 else "world"))
return 0elide run greet ElideHello, Elide!elide greet Elide does the same. Arguments after the name go to sys.argv, and the function’s integer return value
is the exit code. A file named greet, an elide.pkl script or a package.json script of the same name wins; see
Project setup.
Packages
elide install installs no PyPI packages, and elide install --ecosystems=pypi exits 2. Install packages into a
Python 3.13 virtual environment with another tool and point Elide at it with VIRTUAL_ENV; see
Packages and virtual environments.
Tests
Run unittest or pytest through elide python -m; see Python tests. elide test runs JavaScript,
TypeScript and JUnit tests only.
Samples
elide init has no Python template.
Known limitations
- C extensions: some C extension modules do not load.
- pip: not bundled;
elide python -m pipfails withNo module named pip. - More: Python with Elide.