gopythonvenv

package module
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: MIT Imports: 5 Imported by: 0

README

go-pythonvenv

A bridge helping manage python virtual environments from go.


Based on: https://github.com/dhruvmanila/pie

Usage:


env, err := pythonvenv.Create("path")
if err != nil {
  // Handle error
}

// You can use this environment for further operation.
venv := env.Activate()

// This removes all the venv files.
env.Destroy()

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAlreadyPresent = errors.New("Virtual environment already exists.")
)

Functions

This section is empty.

Types

type PythonVenv

type PythonVenv struct {
	Path string
}

Structure representing a PythonVenv

func Create

func Create(path string) (*PythonVenv, error)

Creates a virtual environment in the specified path using the latest Python version available in the system.

func (*PythonVenv) Activate

func (g *PythonVenv) Activate() []string

Activates the virtual environment in the path.

func (*PythonVenv) Destroy

func (g *PythonVenv) Destroy() error

Removes the virtual environment in the specified path.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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