Skip to main content

Typing Stubs for PyGObject

PyPI

Installation

With uv:

uv add --dev pygobject-stubs

With pip:

pip install pygobject-stubs

Configuration

Some libraries exist in multiple versions like Gtk3/4. As both libraries are currently imported under the namespace Gtk only stubs for one can be installed.

You need to decide this at install time either by using the --config-settings option with pip:

pip install pygobject-stubs --no-cache-dir --config-settings=config=Gtk3,Gdk3,Soup2

or by setting the PYGOBJECT_STUB_CONFIG env variable:

PYGOBJECT_STUB_CONFIG=Gtk3,Gdk3,Soup2 pip install --no-cache-dir pygobject-stubs

If no configuration is set, the most recent version of each library is installed.

--no-cache-dir is only necessary on subsequent reinstalls, otherwise the stubs will not be rebuild and a cache of a previous installation is used.

uv

[tool.uv]
config-settings-package = { pygobject-stubs = { config = "Gtk3,Gdk3,Soup2" } }

poetry

https://python-poetry.org/docs/configuration/#installerbuild-config-settingspackage-name

Project Integration

Usually you want the stubs to be installed as part of the development dependencies. pyproject.toml does not allow to pass config-settings to requirements. If you need specific versions of some libraries you can use a requirements.txt file instead, which allows to pass config-settings per requirement as of pip >= 23.1.0.

pip install . -r dev.txt

Contributing

Guide

Release files for PyGObject-stubs 2.17.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PyGObject-stubs 2.17.0
File Size Uploaded
pygobject_stubs-2.17.0.tar.gz 1.0 MB Details

Release files / pygobject_stubs-2.17.0.tar.gz

Download URL pygobject_stubs-2.17.0.tar.gz
Size 1.0 MB
Tags Source
SHA-256 checksum
How to use checksums
66884d26974dd7fb99a8bc5972b5bdeb4b7399ecc7ac53913a6cafa6ab21491f
BLAKE2b-256 checksum
How to use checksums
8cbebf49399ad2e788121f595903a56447d4b778d67acbb01ecfc1c6d5cf91f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

2.17.0 This release

1 release file

2.16.0

1 release file

2.15.0

1 release file

2.14.0

1 release file

2.13.0

1 release file

2.12.0

1 release file

2.11.0

1 release file

2.10.0

1 release file

2.9.0

1 release file

2.8.0

1 release file

2.7.0

1 release file

2.6.0

1 release file

2.5.0

1 release file

2.4.0

1 release file

2.3.1

1 release file

2.3.0

1 release file

2.2.0

1 release file

2.1.0

2 release files

2.0.0

2 release files

1.0.0

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page