Git Product home page Git Product logo

repomd's Introduction

travis-ci.org codecov.io

repomd

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

Usage

Import the Repo class from the module.

>>> from repomd import Repo

Create a repo instance from the baseurl of the repo.

>>> repo = Repo('http://mirror.centos.org/centos/7/os/x86_64')

Optionally, you can delay loading of the repo metadata.

>>> repo = Repo('http://mirror.centos.org/centos/7/os/x86_64', lazy=True)
>>> repo.load()

The length of the repo object indicates the number of packages in the repo.

>>> len(repo)
9591

Find a package.

>>> repo.find('openssl-libs')
<Package: "openssl-libs-1:1.0.2k-8.el7.x86_64">

Find all packages.

>>> repo.findall('openssl-libs')
[<Package: "openssl-libs-1:1.0.2k-8.el7.i686">, <Package: "openssl-libs-1:1.0.2k-8.el7.x86_64">]

Iterate through packages in the repo.

>>> for package in repo:
...     print(package.name)
389-ds-base
389-ds-base-devel
389-ds-base-libs
(and so on)

repomd's People

Contributors

carlwgeorge avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.