Skip to main content

PEP561 stub files for the PyQt5 framework

Project description

mypy logo

PyPI version mypy checked Build Status Downloads Downloads

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
  • PyQt3D
  • PyQtChart
  • PyQtDataVisualization
  • PyQtPurchasing
  • PyQtWebEngine
  • 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.

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

PyQt5-stubs-5.15.2.0.tar.gz (320.4 kB view details)

Uploaded Source

Built Distribution

PyQt5_stubs-5.15.2.0-py3-none-any.whl (371.1 kB view details)

Uploaded Python 3

File details

Details for the file PyQt5-stubs-5.15.2.0.tar.gz.

File metadata

  • Download URL: PyQt5-stubs-5.15.2.0.tar.gz
  • Upload date:
  • Size: 320.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for PyQt5-stubs-5.15.2.0.tar.gz
Algorithm Hash digest
SHA256 dc0dea66f02fe297fb0cddd5767fbf58275b54ecb67f69ebeb994e1553bfb9b2
MD5 4b16d8c8d0cf4d9c004193a8dcf596d9
BLAKE2b-256 d9fdff89cd60023cad1b2af52bff1573dcf6743f7831be915c45f64e1722bc01

See more details on using hashes here.

File details

Details for the file PyQt5_stubs-5.15.2.0-py3-none-any.whl.

File metadata

  • Download URL: PyQt5_stubs-5.15.2.0-py3-none-any.whl
  • Upload date:
  • Size: 371.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for PyQt5_stubs-5.15.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4b750d04ffca1bb188615d1a4e7d655a1d81d30df6ee3488f0adfe09b78e3d36
MD5 2a5ba03bc3f44b1e7e6f4d75f8a5d01c
BLAKE2b-256 b68c4158128ff0e24bcd606896f28515b55df0ab594f7df75df6ffda2b08298b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page