Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Read rpm archive files

Project description


Build Status

Tools for inspecting RPM files in python. This module is modeled after the tarfile module.


import rpmfile

with'file.rpm') as rpm:

    # Inspect the RPM headers
    print(rpm.headers.get('arch', 'noarch'))

    # Extract a fileobject from the archive
    fd = rpm.extractfile('./usr/bin/script')

    for member in rpm.getmembers():


  • rpmfile.RPMFile: The RPMFile object provides an interface to a RPM archive
  • rpmfile.RPMInfo: An RPMInfo object represents one member in a RPMFile.

Code in this module was borrowed from:

Project details

Download files

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

Files for rpmfile, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size rpmfile-1.0.0-py3-none-any.whl (14.0 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size rpmfile-1.0.0.tar.gz (11.5 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page