rpmdyn
Alternative dynamic RPM bindings for Python.
Overview
rpmdyn provides an alternative means of using the rpm library from Python
via dynamic binding (FFI).
This project is intended to support testing Python code based on the rpm
library in CI or development environments where installing official bindings is
too much of a hassle. You may find it useful if you have tried rpm-py-installer
and ran into problems with it.
⚠️Major caveat⚠️: the provided RPM bindings are far from complete! Bindings have been implemented "on demand" to fit the author's needs.
Here's a comparison between a few different ways of accessing RPM Python bindings to help you understand if this project may be of use to you:
| OS package | rpmdyn |
rpm-py-installer |
|
|---|---|---|---|
| pip-installable from PyPI? | ❌ | ✅ | ✅ |
| Usable in virtualenv? | ❌¹ | ✅ | ✅ |
| Supports multiple Python versions? | ❌² | ✅ | ✅ |
| No compilers/headers needed? | ✅ | ✅ | ❌³ |
| Secure supply chain? | ✅ | ✅ | ❌⁴ |
| Complete bindings? | ✅ | ❌⁵ | ✅ |
- Only usable if you enable system site-packages, which is generally unacceptable.
- While there are no hard and fast rules around what kinds of packages a Linux distribution provides, it is common for a distribution to choose one primary supported Python version and only provide libraries for that version.
rpm-py-installerworks by compiling RPM bindings and thus needs a compiler.rpm-py-installerdownloads RPM sources insecurely with no validation of checksums or signatures. This is an issue if you only want to use known versions of all dependencies, and will not work at all in a firewalled setup (e.g. which only allows access to an internal PyPI registry).rpmdynimplements only a small subset of RPM bindings, as bindings need to be implemented manually. The set of available bindings reflects the needs ofrpmdyncontributors.
Usage
Install rpmdyn and it will automatically be used by default:
- if real (native) RPM bindings are available, then
import rpmwill use those. - otherwise,
import rpmwill userpmdyn.
This is achieved via a PTH hook. If you wish to disable this behavior,
set the RPMDYN_HOOK environment variable to 0.
License
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Metadata
Release files for rpmdyn 2025.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rpmdyn-2025.8.tar.gz | 55.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rpmdyn-2025.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 92.3 kB
Release files / rpmdyn-2025.8.tar.gz
| Download URL | rpmdyn-2025.8.tar.gz |
|---|---|
| Size | 55.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f55858080480160a482cda3b3a8cc96f5cedffc3716efc41366c82ecccf89f89
|
|
BLAKE2b-256 checksum How to use checksums |
839f08623c41ef61d050e95bace6002e878b0ce6fceda23f9ea0e2e9d4822f60
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 4, 2025.
Transparency logRelease files / rpmdyn-2025.8-py3-none-any.whl
| Download URL | rpmdyn-2025.8-py3-none-any.whl |
|---|---|
| Size | 36.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ca442df7bdd59c3b194548e7bce1954dee38575047c6ebba260212f6e27cad70
|
|
BLAKE2b-256 checksum How to use checksums |
a47112941c890bec0693fc9d9e63ec00bf8f05e4cbcaad313dbe5e19af7982fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 4, 2025.
Transparency log