Skip to main content

Library for reading dnf/yum repositories

Project description

build status

repomd

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

Usage

>>> import repomd

>>> repo = repomd.load('https://mirror.rackspace.com/centos/7/updates/x86_64/')

>>> repo
<Repo: "https://mirror.rackspace.com/centos/7/updates/x86_64/">

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

>>> len(repo)
1602

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.name
'systemd'

>>> package.version
'219'

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

>>> package.nevr
'systemd-219-57.el7_5.3'

Iterate through packages in the repository.

>>> for package in repo:
...     print(package.nvr)
389-ds-base-1.3.7.5-19.el7_5
389-ds-base-1.3.7.5-21.el7_5
389-ds-base-1.3.7.5-24.el7_5
(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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file repomd-0.2.1.tar.gz.

File metadata

  • Download URL: repomd-0.2.1.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for repomd-0.2.1.tar.gz
Algorithm Hash digest
SHA256 30bd9c329ba465e5b6c5e14ab008260c53fac61e138040b34b19489f3971d7aa
MD5 3979bcf59644ead9fb3324fe36d183ed
BLAKE2b-256 54ef47155c061ac6cbdaa9b12f236474bb40f09a044f7ecb9d66d00d29a61496

See more details on using hashes here.

File details

Details for the file repomd-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: repomd-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for repomd-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6e286a96fbde45c74e0dee5b2a57dece9b9e47798ded2f0e2d164570c81eda65
MD5 87e6bd7d362118bff1cf085f37477716
BLAKE2b-256 9186eaf3c0a16e6e25d97bc0cdefc200e02bf26dcf9e61eb8f7bedfbabffe47e

See more details on using hashes here.

Supported by

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