py

package
v0.2.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2025 License: MIT Imports: 14 Imported by: 1

Documentation

Overview

`py` package provides functions for working with Python.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PipInstall

func PipInstall(dep string)

Install dependencies using uv pip

func PipUninstall

func PipUninstall(dep string)

Uninstall dependencies using uv pip

func ReinstallPyEnv added in v0.2.6

func ReinstallPyEnv() error

reinstall the Python environment

func RunCode

func RunCode(out any, code string) error

Run the Python code and bind the result to the provided struct pointer.

func RunCodef

func RunCodef(out any, code string, args ...any) error

Run the Python code with the given Golang variables and bind the result to the provided struct pointer. The codeTemplate should use $v1, $v2, etc. placeholders for variable substitution.

func RunFile added in v0.1.5

func RunFile(out any, filePath string) error

Run the Python file and bind the result to the provided struct pointer.

func RunFilef added in v0.1.5

func RunFilef(out any, filePath string, args ...any) error

Run the Python file with the given Golang variables and bind the result to the provided struct pointer. The codeTemplate should use $v1, $v2, etc. placeholders for variable substitution.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL