Skip to main content

Library for reading dnf/yum repositories

Project description

build status


This library provides an object-oriented interface to get information out of dnf/yum repositories.


>>> import repomd

>>> repo = repomd.load('')

>>> repo
<Repo: "">

The length of the Repo object indicates the number of packages in the repository.

>>> len(repo)

Find a package by name.

>>> repo.find('systemd')
<Package: "systemd-219-57.el7_5.3.x86_64">

Find all packages of a given name.

>>> repo.findall('systemd')
[<Package: "systemd-219-57.el7_5.1.x86_64">, <Package: "systemd-219-57.el7_5.3.x86_64">]

A Package instance has many useful properties.

>>> package = repo.find('systemd')


>>> package.version

>>> package.build_time
datetime.datetime(2018, 9, 26, 14, 11, 37)

>>> package.nevr

Iterate through packages in the repository.

>>> for package in repo:
...     print(package.nvr)
(and so on)

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

repomd-0.2.1.tar.gz (7.7 kB view hashes)

Uploaded source

Built Distribution

repomd-0.2.1-py3-none-any.whl (3.9 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page