Skip to content

Entry

Interpreter

When no entry point is specified, a python interpreter is launched.

Module

A module's name to be called as python -m module (args) at runtime.

project.entry.module = "name"
pyaket run --module "name"
export PYAKET_ENTRY_MODULE="name"

The actual file called must exist module/__main__.py


Script

A local script to be bundled and called as python script.py (args) after installation.

project.entry.script = "/path/to/script.py"
pyaket run --script /path/to/script.py
export PYAKET_ENTRY_SCRIPT="/path/to/script.py"

Command

A command to be executed as command (args) after installation.

project.entry.command = "command"
pyaket run --command "command"
export PYAKET_ENTRY_COMMAND="command"
  • The venv is activated and the bin directory is added to PATH, so this can be a script defined in your pyproject.toml • [project.scripts] section.

  • It may be used if you have multiple entry points, like depthflow {main,gradio}, and want to hardcode pin one to be used, or set fixed arguments to some command.

Discouraged: Security implications, man in the middle attack, may use wrong executable


Code

An inline Python code to be executed as python -c <code> after installation.

project.entry.code = "print('Hello, World!')"
pyaket run --code "print('Hello, World!')"
export PYAKET_ENTRY_CODE="print('Hello, World!')"