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 ¶
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
Click to show internal directories.
Click to hide internal directories.