Skip to main content

Read rpm archive files

Project description

rpmfile

Build Status Actions Status PyPI version

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


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.1.tar.gz (12.4 kB view details)

Uploaded Source

File details

Details for the file rpmfile-1.0.1.tar.gz.

File metadata

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

File hashes

Hashes for rpmfile-1.0.1.tar.gz
Algorithm Hash digest
SHA256 8c65094fbfbd73d2e97aebe6714cf48f843fe3eddb0304ad0ea682990fbdc0e9
MD5 47b986d16fcb7fb7457c36873585c38b
BLAKE2b-256 f652e0fbb9c504af62cdfdea00e0c234469ca48be85f05a6d9bd1531ebf70e1c

See more details on using hashes here.

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