pyproject-metadata 0.6.1

Hide navigation sidebar
Hide table of contents sidebar
Back to top
Toggle table of contents sidebar

# pyproject-metadata

PEP 621 metadata parsing.

## API Reference

class pyproject_metadata.StandardMetadata(name, version=None, description=None, license=None, readme=None, requires_python=None, dependencies=<factory>, optional_dependencies=<factory>, entrypoints=<factory>, authors=<factory>, maintainers=<factory>, urls=<factory>, classifiers=<factory>, keywords=<factory>, scripts=<factory>, gui_scripts=<factory>, dynamic=<factory>)
  as_rfc822()
    Return type:

      `RFC822Message`

  authors: List[Tuple[str, str]]
  classifiers: List[str]
  dependencies: List[Requirement]
  description: Optional[str] = None
  dynamic: List[str]
  entrypoints: Dict[str, Dict[str, str]]
  classmethod from_pyproject(data, project_dir='.')
    Return type:

      `StandardMetadata`

  gui_scripts: Dict[str, str]
  keywords: List[str]
  license: Optional[License] = None
  maintainers: List[Tuple[str, str]]
  name: str
  optional_dependencies: Dict[str, List[Requirement]]
  readme: Optional[Readme] = None
  requires_python: Optional[SpecifierSet] = None
  scripts: Dict[str, str]
  urls: Dict[str, str]
  version: Optional[Version] = None
  write_to_rfc822(message)
    Return type:

      `None`

class pyproject_metadata.ConfigurationError(msg, *, key=None)

  Error in the backend metadata.

  property key: Optional[str]
    Return type:

      `Optional`[`str`]

class pyproject_metadata.License(text, file)

  Create new instance of License(text, file)

  file: Optional[Path]

    Alias for field number 1

  text: str

    Alias for field number 0

class pyproject_metadata.Readme(text, file, content_type)

  Create new instance of Readme(text, file, content_type)

  content_type: str

    Alias for field number 2

  file: Optional[Path]

    Alias for field number 1

  text: str

    Alias for field number 0

class pyproject_metadata.RFC822Message

  Simple RFC 822 message implementation.

  Note: Does not support multiline fields, as Python packaging flavored RFC 822 metadata does.

class pyproject_metadata.DataFetcher(data)
  get(key)
    Return type:

      `Any`

  get_dict(key)
    Return type:

      `Dict`[`str`, `str`]

  get_list(key)
    Return type:

      `List`[`str`]

  get_people(key)
    Return type:

      `List`[`Tuple`[`str`, `str`]]

  get_str(key)
    Return type:

      `Optional`[`str`]