requirementsnet

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2025 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Overview

Package requirementsnet extracts requirements files with .

Index

Constants

View Source
const (
	// Name is the unique name of this extractor.
	Name = "python/requirementsnet"
)

Variables

This section is empty.

Functions

func NewDefault

func NewDefault() filesystem.Extractor

NewDefault returns an extractor with the default config settings.

Types

type Config

type Config struct {
	resolve.Client
	// This should be an extractor to extract inventories from requirements.txt offline.
	*requirements.Extractor // Extractor to extract inventories from requirements.txt offline.
}

Config is the configuration for the Extractor.

func DefaultConfig

func DefaultConfig() Config

DefaultConfig returns the default configuration for the extractor.

type Extractor

type Extractor struct {
	resolve.Client

	BaseExtractor *requirements.Extractor // The base extractor that we use to extract direct dependencies.
}

Extractor extracts python packages from requirements.txt files.

func New

func New(cfg Config) *Extractor

New returns a requirements.txt transitive extractor.

For most use cases, initialize with: ``` e := New(DefaultConfig()) ```

func (Extractor) Extract

Extract extracts packages from requirements files passed through the scan input.

func (Extractor) FileRequired

func (e Extractor) FileRequired(api filesystem.FileAPI) bool

FileRequired returns true if the specified file matches python Metadata file patterns.

func (Extractor) Name

func (e Extractor) Name() string

Name of the extractor.

func (Extractor) Requirements

func (e Extractor) Requirements() *plugin.Capabilities

Requirements of the extractor.

func (Extractor) Version

func (e Extractor) Version() int

Version of the extractor.

Jump to

Keyboard shortcuts

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