python

package
v0.52.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

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 Dependency

type Dependency struct {
	Version string `json:"version"`
}

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

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 PipfileLock

type PipfileLock struct {
	Meta struct {
		Hash struct {
			Sha256 string `json:"sha256"`
		} `json:"hash"`
		PipfileSpec int `json:"pipfile-spec"`
		Requires    struct {
			PythonVersion string `json:"python_version"`
		} `json:"requires"`
		Sources []struct {
			Name      string `json:"name"`
			URL       string `json:"url"`
			VerifySsl bool   `json:"verify_ssl"`
		} `json:"sources"`
	} `json:"_meta"`
	Default map[string]Dependency `json:"default"`
	Develop map[string]Dependency `json:"develop"`
}

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