pypi

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filename

type Filename struct {
	Info FilenameInfo
	// contains filtered or unexported fields
}

func NewFilename

func NewFilename(filename string) Filename

func (*Filename) UnmarshalJSON

func (f *Filename) UnmarshalJSON(data []byte) error

type FilenameInfo

type FilenameInfo struct {
	Distribution string
	Version      pep440.Version
	BuildTag     string
	PythonTags   []string
	ABITags      []string
	// https://packaging.python.org/en/latest/specifications/platform-compatibility-tags/#platform-tag
	PlatformTags         []string
	IsBinaryDistribution bool
}

func (*FilenameInfo) UnmarshalText

func (f *FilenameInfo) UnmarshalText(data []byte) error

type SimpleFile

type SimpleFile struct {
	Filename Filename         `json:"filename"`
	URL      string           `json:"url"`
	Hashes   SimpleFileHashes `json:"hashes"`
	// Yanked is the reason for yanking, or empty if not yanked.
	// This deviates from the PyPI simple API where the reason is a non-empty string when yanked, and boolean false when not.
	Yanked Yanked `json:"yanked"`
}

type SimpleFileHashes

type SimpleFileHashes struct {
	SHA256 string `json:"sha256"`
}

type SimpleProject

type SimpleProject struct {
	Name  string       `json:"name"`
	Files []SimpleFile `json:"files"`
}

func (SimpleProject) PreferredOsArchSimpleFiles

func (p SimpleProject) PreferredOsArchSimpleFiles(version string) (osArchPreferred map[string]SimpleFile, others []SimpleFile)

func (SimpleProject) ValidVersions

func (p SimpleProject) ValidVersions() []pep440.Version

ValidVersions returns versions of the project, sorted in newest to oldest order. Non-PEP-440 versions are ignored, as are ones containing no files or yanked files only.

type Yanked

type Yanked string

func (*Yanked) UnmarshalJSON

func (y *Yanked) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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