python

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2021 License: Apache-2.0 Imports: 15 Imported by: 2

Documentation

Overview

Package python provides a concrete Cataloger implementation for Python ecosystem files (egg, wheel, requirements.txt).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPythonIndexCataloger

func NewPythonIndexCataloger() *common.GenericCataloger

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

Types

type PackageCataloger

type PackageCataloger struct{}

func NewPythonPackageCataloger

func NewPythonPackageCataloger() *PackageCataloger

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

func (*PackageCataloger) Catalog

func (c *PackageCataloger) Catalog(resolver source.FileResolver) ([]pkg.Package, error)

Catalog is given an object to resolve file references and content, this function returns any discovered Packages after analyzing python egg and wheel installations.

func (*PackageCataloger) Name

func (c *PackageCataloger) Name() string

Name returns a string that uniquely describes a cataloger

type PoetryMetadata

type PoetryMetadata struct {
	Packages []PoetryMetadataPackage `toml:"package"`
}

func (PoetryMetadata) Pkgs

func (m PoetryMetadata) Pkgs() []pkg.Package

Pkgs returns all of the packages referenced within the poetry.lock metadata.

type PoetryMetadataPackage

type PoetryMetadataPackage struct {
	Name        string `toml:"name"`
	Version     string `toml:"version"`
	Category    string `toml:"category"`
	Description string `toml:"description"`
	Optional    bool   `toml:"optional"`
}

func (PoetryMetadataPackage) Pkg

Pkg returns the standard `pkg.Package` representation of the package referenced within the poetry.lock metadata.

Jump to

Keyboard shortcuts

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