API Reference — gentle 0.2

# API Reference

## gentle.generators

Generic generator routines

class gentle.generators.AbstractGenerator(srcdir: Path)

  Generic class for metadata generators.

## gentle.metadata

Generic metadata parsing structures and routines

class gentle.metadata.MetadataXML(xmlfile: Path)

  Parse and write `metadata.xml` files.

  add_upstream_maintainer(person: Person) → None

    Add a person to the list of upstream maintainers

  add_upstream_remote_id(remote_id: RemoteID) → None

    Add an item to the list of remote ids

  dump() → None

    Write `metadata.xml` file

  dumps() → None

    Convert the object to text

  property maintainers: list[gentle.metadata.Person]

    List of package maintainers

  set_upstream_bugs_to(url: str) → None

    Set upstream bugs-to URL

  set_upstream_changelog(url: str) → None

    Set upstream changelog URL

  set_upstream_doc(url: str) → None

    Set upstream documentation URL

  property upstream: Upstream

    Upstream information

class gentle.metadata.Person(name: str = '', email: str = '')
  to_xml(attrib: dict | None = None) → Element
    Parameters:

      attrib – attributes for the `<maintainer>` tag

    Returns:

      `metadata.xml` respresentation of a person

class gentle.metadata.RemoteID(attr: str, value: str)
  to_xml() → Element
    Returns:

      `metadata.xml` respresentation of a remote id

class gentle.metadata.Upstream(maintainers: list[gentle.metadata.Person] = <factory>, changelog: Optional[str] = None, doc: Optional[str] = None, bugs_to: Optional[str] = None, remote_ids: list[gentle.metadata.RemoteID] = <factory>)