Skip to content

Feature request: import Python modules from files in Monty's filesystem (code reuse) #480

Description

@chkp-itamarst

Context

We'd like sandboxed code to be able to import from .py files in Monty's filesystem — pull functions/helpers out of a module placed there — so code can be shared and reused across executions instead of copy-pasted into every snippet.
This isn't third-party/package import (a known non-goal); it's loading code that already lives in Monty's filesystem.
(Today from lib import helper raisesModuleNotFoundErrorimport resolves only the built-in stdlib. )

Request

Let import (or a dedicated load call) resolve modules from files in Monty's filesystem. The loaded source runs in the same sandbox, so it grants no capability beyond "run more sandboxed Python."

Prior art

Starlark offers similar behavior via its native load("lib.star", "helper").

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions