guides

Local Imports and Project Bundles

How to compile multi-file Python projects with local module imports.

Published May 30, 2026

Single-File Projects

For a single Python file, simply run:

pyvorin run main.py

Multi-File Projects

When your script imports local modules, use the bundle options:

pyvorin run main.py --project-root ./src --bundle-all-project

Bundle Options

FlagDescription
--project-rootRoot directory for resolving imports.
--bundle-all-projectInclude all .py files under project root.
--includeAdditional glob patterns to include.
--excludeGlob patterns to exclude from bundle.
--dry-run-bundleShow what would be bundled without sending.

Import Resolution

Pyvorin resolves local imports relative to the project root. Unresolved imports are logged as warnings but do not block compilation — they fall back to CPython at runtime.

Package Structure Example

myproject/
  main.py
  utils/
    __init__.py
    helpers.py
  data/
    config.py
pyvorin run main.py --project-root . --bundle-all-project