python

package
v0.31.5 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BaseImage     = "python:3.14-slim-bookworm"
	CacheLocation = "/root/.cache/pip"
)

Variables

This section is empty.

Functions

func CacheFolder

func CacheFolder() string

func ComputeChecksum

func ComputeChecksum(data []byte) string

TODO: provide a shorter checksum

func Images added in v0.31.0

func Images(build container.Build) []string

func Matches added in v0.31.0

func Matches(build container.Build) bool

Matches implements the Build interface - Debian variant runs when from=debian

func New

func New() build.BuildStepv2

func NewProd

func NewProd() build.BuildStepv2

func PythonImage

func PythonImage(build container.Build) string

func Script

func Script(bs *BuildScript) string

Types

type BuildScript

type BuildScript struct {
	Folder       string
	PrivateIndex PrivateIndex
	Commands     Commands
	Verbose      bool
}

func NewBuildScript

func NewBuildScript(folder string, verbose bool, privateIndex PrivateIndex, commands Commands) *BuildScript

type Builder added in v0.31.4

type Builder struct {
	Folder string
	Tool   Tool
	// contains filtered or unexported fields
}

func NewBuilder added in v0.31.4

func NewBuilder(folder string) *Builder

func (*Builder) Analyze added in v0.31.4

func (b *Builder) Analyze() (Tool, error)

func (*Builder) Build added in v0.31.4

func (b *Builder) Build() (Commands, error)

type Commands added in v0.31.4

type Commands [][]string

func (Commands) String added in v0.31.4

func (c Commands) String() string

type Files added in v0.31.4

type Files struct {
	// contains filtered or unexported fields
}

type Image

type Image string

type PrivateIndex added in v0.31.4

type PrivateIndex string

func NewPrivateIndex added in v0.31.4

func NewPrivateIndex(custom container.Custom) PrivateIndex

func (PrivateIndex) Environ added in v0.31.4

func (pi PrivateIndex) Environ() string

func (PrivateIndex) String added in v0.31.4

func (pi PrivateIndex) String() string

func (PrivateIndex) Username added in v0.31.4

func (pi PrivateIndex) Username() string

type PythonContainer

type PythonContainer struct {
	Platform types.Platform
	*container.Container
	App          string
	File         string
	Folder       string
	Image        string
	ImageTag     string
	Secret       map[string]string
	PrivateIndex PrivateIndex
}

func (*PythonContainer) Address

func (c *PythonContainer) Address() *network.Address

func (*PythonContainer) Build

func (c *PythonContainer) Build() (string, error)

func (*PythonContainer) BuildPythonImage

func (c *PythonContainer) BuildPythonImage() error

func (*PythonContainer) BuildScript

func (c *PythonContainer) BuildScript() string

func (*PythonContainer) Prod

func (c *PythonContainer) Prod() error

func (*PythonContainer) Pull

func (c *PythonContainer) Pull() error

func (*PythonContainer) Run

func (c *PythonContainer) Run() error

type Tool added in v0.31.4

type Tool string
const (
	ToolUV     Tool = "uv"
	ToolPoetry Tool = "poetry"
	ToolPip    Tool = "pip"
)

Jump to

Keyboard shortcuts

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