Skip to main content

Module script

Module script 

Source
Expand description

PEP 723 script support

This module provides functionality for running Python scripts with inline dependency specifications (PEP 723):

  • Parsing inline metadata from script comments
  • Creating ephemeral environments for script execution
  • Caching environments by dependency hash

Structs§

ScriptMetadata
Metadata extracted from a PEP 723 script
ScriptRunner
Script runner for PEP 723 scripts

Functions§

is_pep723_script
Check if a file is a Python script that might have PEP 723 metadata
might_have_metadata
Check if a file looks like it might have PEP 723 metadata
parse_script_metadata
Parse PEP 723 inline script metadata from script content