qres
A fast Qt resource compiler for Python, implemented as a C extension. Drop-in replacement for pyrcc5 / pyside6-rcc that compiles .qrc files into _rc.py modules without requiring a Qt installation.
Installation
pip install qres
Pre-built wheels are available for Linux (x86_64, aarch64), macOS (x86_64, arm64), and Windows (AMD64, ARM64) on Python 3.11+.
Usage
CLI
qres resources.qrc
qres resources.qrc -o path/to/resources_rc.py
qres resources.qrc --binding PySide6
Python API
import qres
# Compile from a file path
qres.compile_file("resources.qrc")
qres.compile_file("resources.qrc", output="resources_rc.py")
qres.compile_file("resources.qrc", binding="PySide6")
# Compile from an XML string, returns raw blobs
blobs = qres.compile(xml_string, base_dir="/path/to/qrc/dir")
# blobs: {"data": bytes, "name": bytes, "struct_v1": bytes, "struct_v2": bytes}
The generated _rc.py works with qtpy, PyQt5, PyQt6, PySide2, and PySide6. By default, it includes an automatic fallback import chain that resolves whichever Qt binding is installed in the active environment.
How it works
qres parses the .qrc XML, builds a virtual file tree sorted by Qt's hash function, compresses each asset with zlib at level 9 (skipping compression when it doesn't help or for .ico files), then serializes two binary struct formats — v1 for Qt < 5.8 and v2 for Qt >= 5.8 — into Python byte literals.
Limitations
- Locale attributes: The
langattribute on<qresource>tags is ignored. All resources are compiled under the default Qt C locale (mix = 1). - XML compression attributes: Per-file and per-resource
<file compress="...">and<file threshold="...">attributes are ignored. Compression is automatically handled at level 9 for compressible payloads. - Compression format: Assets use standard
zlibcompression to maintain universal compatibility across PyQt5, PyQt6, PySide2, and PySide6. Newer Qt 6 algorithms likezstdare not used. - Binary
.rccexport: qres outputs Python_rc.pysource modules for direct import in Python applications, rather than external binary.rccfiles.
Benchmarks
Benchmarked on a 50 MB uncompressed text asset compiled into a registered Qt resource module:
| Metric | Measurement |
|---|---|
| Input payload | 50.00 MB (52,428,800 bytes) |
| Compile duration | 403 ms (0.40 s) |
| Compilation throughput | 124 MB/s |
| Generated module size | 1.23 MB (97.5% compression) |
| Qt resource read speed | 93 ms (534 MB/s) |
| Data integrity | SHA-256 verified |
Contributing
See CONTRIBUTING.md.
Building from source
Requires a C compiler.
git clone https://github.com/farhaanaliii/qres
cd qres
pip install -e .
License
MIT — see LICENSE.
Metadata
Release files for qres 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| qres-0.1.2.tar.gz | 12.8 kB | Details |
Built distributions (wheels)
Total release size: 468.5 kB
Release files / qres-0.1.2.tar.gz
| Download URL | qres-0.1.2.tar.gz |
|---|---|
| Size | 12.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
06615a3726bcb468e971bb91f8b682b99476a8fd8dabd6a56936e49a9e15a3fd
|
|
BLAKE2b-256 checksum How to use checksums |
00eb2cbef74f38a549ac4493902596ca7d2eef03c1cf166ccbc2a6ef1889cb8d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 26, 2026.
Transparency logRelease files / qres-0.1.2-cp313-cp313-win_arm64.whl
| Download URL | qres-0.1.2-cp313-cp313-win_arm64.whl |
|---|---|
| Size | 15.9 kB |
| Tags | CPython 3.13 Windows ARM64 |
|
SHA-256 checksum How to use checksums |
383f9ae3b0c4263cee3631d63a8f9c0ae8288f19037125304286473dcaecfc70
|
|
BLAKE2b-256 checksum How to use checksums |
8f463697aa5f3092c6058fd0708b954ed52a1a414d23c61c00b9a9048b410936
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 26, 2026.
Transparency logRelease files / qres-0.1.2-cp313-cp313-win_amd64.whl
| Download URL | qres-0.1.2-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 16.6 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
62261c48dfc996e6512138cb752202c5acceb1c0f2d2800374544e715b9e9989
|
|
BLAKE2b-256 checksum How to use checksums |
4e505ccc4ecba8260e0822d107fd537fc7404ec7a0956244777e54457008dd2d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 26, 2026.
Transparency logRelease files / qres-0.1.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | qres-0.1.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 45.9 kB |
| Tags | CPython 3.13 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
32679d682dbccc5dd39f84f53f6a3b0b1cd691b300d5c34b06bcc4c95f4d7836
|
|
BLAKE2b-256 checksum How to use checksums |
3e63f840c4255ddba228eb96cb81d26607fab06d9240d3a98b9a862df33632cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 26, 2026.
Transparency logRelease files / qres-0.1.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | qres-0.1.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 45.5 kB |
| Tags | CPython 3.13 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
eea82091a283b46e9867ad82ecc6795bf82a9a462ecd9e3b213f43d8e27a8b04
|
|
BLAKE2b-256 checksum How to use checksums |
737e28b6400aef1007252c8729fd7caf9de06459ed51d6ebe2e85bb8ab1bf295
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 26, 2026.
Transparency logRelease files / qres-0.1.2-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | qres-0.1.2-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 14.5 kB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
d9575831d6fc5f0fc7639079a8d36b145157473ab2e40fdd90bd9d0b98c868cf
|
|
BLAKE2b-256 checksum How to use checksums |
2188018f3ed2e1ea6ac553b473feb50c88c709076eed956d84efd78791650f0f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 26, 2026.
Transparency logRelease files / qres-0.1.2-cp313-cp313-macosx_10_13_x86_64.whl
| Download URL | qres-0.1.2-cp313-cp313-macosx_10_13_x86_64.whl |
|---|---|
| Size | 14.8 kB |
| Tags | CPython 3.13 macOS 10.13+ x86-64 |
|
SHA-256 checksum How to use checksums |
363e117317bda187c23922d9e5be377b3e5b9a8cc3ea81827c4126ca3fe41e16
|
|
BLAKE2b-256 checksum How to use checksums |
ac26674d3a37d5c3e76487859ef552ce26e474ff3bdf60f0bcf53545de035380
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 26, 2026.
Transparency logRelease files / qres-0.1.2-cp312-cp312-win_arm64.whl
| Download URL | qres-0.1.2-cp312-cp312-win_arm64.whl |
|---|---|
| Size | 15.8 kB |
| Tags | CPython 3.12 Windows ARM64 |
|
SHA-256 checksum How to use checksums |
a9d877277b98ac52c5587dd9555bee8b3776c3667c77afaf3a6e72f26f0beec9
|
|
BLAKE2b-256 checksum How to use checksums |
28b813cc09baf7097b41b0cbba44fd6f38e4a47f561f3077f10d442eae3129a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 26, 2026.
Transparency logRelease files / qres-0.1.2-cp312-cp312-win_amd64.whl
| Download URL | qres-0.1.2-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 16.6 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
92eb78fb7c1f1dc9ada519c09e9f121f66b654e2efab6a30fc9be58979127214
|
|
BLAKE2b-256 checksum How to use checksums |
1efbd6a39e9a1e02b886a8800479faf62dab82acd2fbf5bcf965d0326f09209d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 26, 2026.
Transparency logRelease files / qres-0.1.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | qres-0.1.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 45.9 kB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
6b1eda925e0272aa2d7417f58b0ce76ed634815f38ee624b9044d8f100f5140a
|
|
BLAKE2b-256 checksum How to use checksums |
c92b24f87093b0fd031bfab1d764a64d563ca058bd1d5f994e118c225b30b65a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 26, 2026.
Transparency logRelease files / qres-0.1.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | qres-0.1.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 45.5 kB |
| Tags | CPython 3.12 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
5b301cb65fedf0b81227d99441e377c856226dcae4f15163d03c796e6f1be19d
|
|
BLAKE2b-256 checksum How to use checksums |
1dfda0a0f0ce44942e766985168139c742399ec4cd6b494c3b411e7f04fe5ce1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 26, 2026.
Transparency logRelease files / qres-0.1.2-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | qres-0.1.2-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 14.5 kB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
caca4ae92fe3cf31246ee66fc96c84ef53f0b35e036de45a37720ac024f4cb98
|
|
BLAKE2b-256 checksum How to use checksums |
11d643cc2e566cd0d9e694595457522253a8e8720d64666ae56b76fdc68a910c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 26, 2026.
Transparency logRelease files / qres-0.1.2-cp312-cp312-macosx_10_13_x86_64.whl
| Download URL | qres-0.1.2-cp312-cp312-macosx_10_13_x86_64.whl |
|---|---|
| Size | 14.8 kB |
| Tags | CPython 3.12 macOS 10.13+ x86-64 |
|
SHA-256 checksum How to use checksums |
a7e0459d127c2edbef668a8655366549a0350a603a8bae6ca10e7dce1fdb5d9f
|
|
BLAKE2b-256 checksum How to use checksums |
a337354a10124b38594e08275b84e02803f81f21c0c9e23111e10cd70bffd53c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 26, 2026.
Transparency logRelease files / qres-0.1.2-cp311-cp311-win_arm64.whl
| Download URL | qres-0.1.2-cp311-cp311-win_arm64.whl |
|---|---|
| Size | 15.8 kB |
| Tags | CPython 3.11 Windows ARM64 |
|
SHA-256 checksum How to use checksums |
bce7b96717e827b3c7f9afdb8ced182e445b83099a009f3c386a9a9b81a30b15
|
|
BLAKE2b-256 checksum How to use checksums |
6b48733dfd5c9f768b8b7e772f18122f260ce387d5d31157fac6744131fdc2a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 26, 2026.
Transparency logRelease files / qres-0.1.2-cp311-cp311-win_amd64.whl
| Download URL | qres-0.1.2-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 16.5 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
ae832704f9396637308f7398e51f81ddcf954feb08fb1c311e606b7881e2bab2
|
|
BLAKE2b-256 checksum How to use checksums |
9c3e63d9a1bc5249eb30053a8d59588a7507803f41e5a1924f7a7fc39ebd4b45
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 26, 2026.
Transparency logRelease files / qres-0.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | qres-0.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 44.3 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
d06b27dfcf433f5060af6f0343c33eb050a619e5172b7b8429256c316498d521
|
|
BLAKE2b-256 checksum How to use checksums |
d683f1140bd8af05b78ce846f56d7e43994e5af0039a0ecd1e0f70d28f968281
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 26, 2026.
Transparency logRelease files / qres-0.1.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | qres-0.1.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 43.7 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
fb9bcf6dfae411422480f50245355213eda06b32b2797126448bb510380ed407
|
|
BLAKE2b-256 checksum How to use checksums |
ab1c32c3411e605ca374a8586dcf5211d0c115c10bd0e8efe34b87fa37a58852
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 26, 2026.
Transparency logRelease files / qres-0.1.2-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | qres-0.1.2-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 14.4 kB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
623ab0e4792fc90947cd603b6956556f139c9104b2808b80fc884a9d728dc65c
|
|
BLAKE2b-256 checksum How to use checksums |
b34fd01ad1c9f3f34b00758a832fbbc6a3d8dcf8cbf5d5eb00b693cd607e208a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 26, 2026.
Transparency logRelease files / qres-0.1.2-cp311-cp311-macosx_10_9_x86_64.whl
| Download URL | qres-0.1.2-cp311-cp311-macosx_10_9_x86_64.whl |
|---|---|
| Size | 14.6 kB |
| Tags | CPython 3.11 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
a028fbd1106cffa3f50b78186d9b72cccc46c66689f4361bfe2f5a5bb005378a
|
|
BLAKE2b-256 checksum How to use checksums |
360315a1e2dc9b4f68d5271470f1ce52ee67f77228bf0e7377785dcc059f5019
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 26, 2026.
Transparency log