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 ¶ added in v0.95.0
NewInstalledPackageCataloger returns a new cataloger for python packages within egg or wheel installation directories.
func NewPackageCataloger ¶ added in v0.95.0
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 ¶ added in v0.86.0
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 ¶ added in v0.86.0
func DefaultCatalogerConfig() CatalogerConfig
func (CatalogerConfig) WithGuessUnpinnedRequirements ¶ added in v1.38.0
func (c CatalogerConfig) WithGuessUnpinnedRequirements(input bool) CatalogerConfig
func (CatalogerConfig) WithPypiBaseURL ¶ added in v1.38.0
func (c CatalogerConfig) WithPypiBaseURL(input string) CatalogerConfig
func (CatalogerConfig) WithSearchRemoteLicenses ¶ added in v1.38.0
func (c CatalogerConfig) WithSearchRemoteLicenses(input bool) CatalogerConfig
Click to show internal directories.
Click to hide internal directories.