# Repositories

class hawkey.Repo

  Instances of `hawkey.Repo` point to metadata of packages that are available to be installed. The metadata are expected to be in the “rpm-md” format. librepo may help you with downloading the required files.

  cost

    An integer specifying a relative cost of accessing this repository. This value is compared when the priorities of two repositories are the same. The repository with the lowest cost is picked. It is useful to make the library prefer on-disk repositories to remote ones.

  filelists_fn

    A valid string path to the readable “filelists” XML file if set.

  name

    A string name of the repository.

  presto_fn

    A valid string path to the readable “prestodelta.xml” (also called “deltainfo.xml”) file if set.

  primary_fn

    A valid string path to the readable “primary” XML file if set.

  priority

    An integer priority value of this repository. If there is more than one candidate package for a particular operation, the one from the repository with the lowest priority value is picked, possibly despite being less convenient otherwise (e.g. by being a lower version).

  repomd_fn

    A valid string path to the readable “repomd.xml” file if set.

  updateinfo_fn

    A valid string path to the readable “updateinfo.xml” file if set.

  __init__(name)

    Initialize the repository with empty `repomd_fn`, `primary_fn`, `filelists_fn` and `presto_fn`. The priority and the cost are set to `0`.

    name is a string giving the name of the repository. The name should not be equal to `hawkey.SYSTEM_REPO_NAME` nor `hawkey.CMDLINE_REPO_NAME`