Skip to main content

Read rpm archive files

Project description

rpmfile

Build Status

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

Uploaded Source

Built Distribution

rpmfile-1.0.0-py3-none-any.whl (14.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rpmfile-1.0.0.tar.gz
  • Upload date:
  • Size: 11.5 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.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for rpmfile-1.0.0.tar.gz
Algorithm Hash digest
SHA256 873a0f6b4538f0d48863ea3b55af47316bed29142a6751197e0e85f7dfaea8c5
MD5 59ce5bd6c934431608be2c0be7e58cce
BLAKE2b-256 1c11baf8aa2372101836666b590ea53c04cfbc1aab01996e7373ab7455cbf8f4

See more details on using hashes here.

File details

Details for the file rpmfile-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: rpmfile-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 14.0 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.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for rpmfile-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9da10315adca06a7bb15baf6ee2f374724e28fddff2b07bc36cedba49b018b3e
MD5 9d491608688013872edc4e7cc1c63b6f
BLAKE2b-256 600499512d6a72fd6f367e88bc333551f7d3bf63826d8c0fe9cfe78f470175cd

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