python

package
v1.42.1-cn Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2026 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Overview

Package python provides a concrete Cataloger implementation relating to packages within the Python language ecosystem.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewInstalledPackageCataloger

func NewInstalledPackageCataloger() pkg.Cataloger

NewInstalledPackageCataloger returns a new cataloger for python packages within egg or wheel installation directories.

func NewPackageCataloger

func NewPackageCataloger(cfg CatalogerConfig) pkg.Cataloger

NewPackageCataloger returns a new cataloger for python packages referenced from poetry lock files, requirements.txt files, and setup.py files.

Types

type CatalogerConfig

type CatalogerConfig struct {
	// GuessUnpinnedRequirements attempts to infer package versions from version constraints when no explicit version is specified in requirements files.
	// app-config: python.guess-unpinned-requirements
	GuessUnpinnedRequirements bool `yaml:"guess-unpinned-requirements" json:"guess-unpinned-requirements" mapstructure:"guess-unpinned-requirements"`
	// SearchRemoteLicenses enables querying the PyPI registry API to retrieve license information for packages that are missing license data in their local metadata.
	// app-config: python.search-remote-licenses
	SearchRemoteLicenses bool `json:"search-remote-licenses" yaml:"search-remote-licenses" mapstructure:"search-remote-licenses"`
	// PypiBaseURL specifies the base URL for the Pypi registry API used when searching for remote license information.
	// app-config: python.pypi-base-url
	PypiBaseURL string `json:"pypi-base-url" yaml:"pypi-base-url" mapstructure:"pypi-base-url"`
}

func DefaultCatalogerConfig

func DefaultCatalogerConfig() CatalogerConfig

func (CatalogerConfig) WithGuessUnpinnedRequirements

func (c CatalogerConfig) WithGuessUnpinnedRequirements(input bool) CatalogerConfig

func (CatalogerConfig) WithPypiBaseURL

func (c CatalogerConfig) WithPypiBaseURL(input string) CatalogerConfig

func (CatalogerConfig) WithSearchRemoteLicenses

func (c CatalogerConfig) WithSearchRemoteLicenses(input bool) CatalogerConfig

Jump to

Keyboard shortcuts

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