Read rpm archive files
Project description
rpmfile
Tools for inspecting RPM files in python. This module is modeled after the tarfile module.
Example
import rpmfile
with rpmfile.open('file.rpm') as rpm:
# Inspect the RPM headers
print(rpm.headers.keys())
print(rpm.headers.get('arch', 'noarch'))
# Extract a fileobject from the archive
fd = rpm.extractfile('./usr/bin/script')
print(fd.read())
for member in rpm.getmembers():
print(member)
Classes
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rpmfile-1.0.0.tar.gz
(11.5 kB
view hashes)
Built Distribution
rpmfile-1.0.0-py3-none-any.whl
(14.0 kB
view hashes)