# `aptsources.distinfo` — provide meta information for distro repositories

Note

This part of the documentation is created automatically.

class aptsources.distinfo.Component(name: str, desc: str | None = None, long_desc: str | None = None, parent_component: str | None = None)
  get_description() → str | None
  get_description_long() → str | None
  get_parent_component() → str | None
  set_description(desc: str) → None
  set_description_long(desc: str) → None
  set_parent_component(parent: str) → None

class aptsources.distinfo.DistInfo(dist: str | None = None, base_dir: str = '/usr/share/python-apt/templates')
  finish_template(template: Template, component: Component | None) → None

    finish the current tempalte

class aptsources.distinfo.Mirror(proto: str, hostname: str, dir: str, location: str | None = None)

  Storage for mirror related information

  add_repository(proto: str, dir: str) → None
  get_location() → str | None
  get_repo_urls() → list[str]
  get_repositories_for_proto(proto: str) → list[Repository]
  has_repository(proto: str, dir: str) → bool
  set_location(location: str) → None

class aptsources.distinfo.Repository(proto: str, dir: str)
  get_info() → tuple[str, str]
  get_url(hostname: str) → str

class aptsources.distinfo.Template
  has_component(comp: str) → bool

    Check if the distribution provides the given component

  is_mirror(url: str) → bool

    Check if a given url of a repository is a valid mirror

aptsources.distinfo.split_url(url: str) → list[str]

  split a given URL into the protocoll, the hostname and the dir part