Skip to content

doc: python script support #108

@JosiahParry

Description

@JosiahParry

Following ricochet PR #477 we now have Python script support. We need to document this. Some notes are

  1. Requirements for Python content
    - Must have .python-version file (specifies target Python version, e.g., 3.12 or 3.12.7)
    - Must have uv.lock file (generated by uv lock)
    - .python-version must satisfy requires-python constraint in uv.lock
  2. uv binary resolution
    - Vendored: $RICOCHET_HOME/vendor/py/uv (preferred)
    - Fallback: uv on system PATH
  3. Python version discovery
    - Only uv-managed Python installations are used
    - Command: uv python list --only-installed --managed-python --no-python-downloads
  4. uv cache location
    - $RICOCHET_HOME/.cache/uv
    - Created automatically during first Python deployment
  5. Environment restoration command
    - uv sync --python <path> --cache-dir <cache> --no-python-downloads --frozen --color always
  6. Content types supported
    - Python (invokable scripts)
  7. Limitations
    - K8s/Docker exec-env support not yet implemented (local execution only)
    - Python versions must be pre-installed via uv

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions