Mypy stubs for the PyQt5 framework
This repository holds the stubs of the PyQt5 framework. It uses the stub files that are produced during compilation process of PyQt5. These stub files have been modified by the author to allow using them for type-checking via Mypy. This repository is far from complete and the author will appreciate any PRs or Issues that help making this stub-repository more reliable.
Installation
Simply install PyQt5-stubs with pip:
$ pip install PyQt5-stubs
Or clone the latest version from Github and install it via Python setuptools:
$ git clone https://github.com/stlehmann/PyQt5-stubs.git
$ python setup.py install
Supported Modules
The following modules are supported by PyQt5-stubs:
- QtCore
- QtWidgets
- QtGui
- QtDBus
- QtNetwork
- QtOpenGL
- QtPrintSupport
- QtSql
- QtTest
- QtXml
- sip
Building upstream stubs
The Dockerfile is used to build all of the stubs for the upstream PyQt5 modules. The Dockerfile consists of multiple build layers:
- core:
PyQt5 PyQt3DPyQtChartPyQtDataVisualizationPyQtPurchasingPyQtWebEngine- an output layer
Each module build layer deposits its stub files within /output/ in its
filesystem. The output layer then collects the contents of each into its own
/output/ dir for export to the host computer. Build args are provided to
change the version of each module.
A convenience script, build_upstream.py, is provided. It builds the stubs and
copies them to the host computer. Make sure you install docker-py to use it.
It builds $PWD/Dockerfile (overridden with --dockerfile) and outputs the
stubs to $PWD/PyQt5-stubs (overridden with --output-dir).
* There are a few missing modules: QtAxContainer, QtAndroidExtras,
QtMacExtras, and QtWindowsExtras. The current project understanding is that
they need to be built on the target platform, something a Linux-based docker
image cannot do. The deprecated Enginio module is also missing.
Metadata
Release files for PyQt5-stubs 5.14.2.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 | Provenance | |
|---|---|---|---|---|
| PyQt5-stubs-5.14.2.2.tar.gz | 222.1 kB | Without provenance | Details |
Release files / PyQt5-stubs-5.14.2.2.tar.gz
| Download URL | PyQt5-stubs-5.14.2.2.tar.gz |
|---|---|
| Size | 222.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b1a84b12bbeed74d95cc7fb4fd2df0a6711bd43e9a2651e552c83930c7b81638
|
|
BLAKE2b-256 checksum How to use checksums |
49f4d26fe3d5071c4b0781b4bf7f9c81340a67ef34ea8a77c2a3dcb7e8879424
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200325 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
|
Security for PyQt5-stubs 5.14.2.2
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.