Registry / type-stubs / graphene-stubs

graphene-stubs

JSON →
library0.16pypypiunverified

graphene-stubs provides type stubs and a mypy plugin for Graphene (the GraphQL framework for Python). Version 0.16 adds comprehensive stubs for graphene objects and enhances mypy integration. Releases are infrequent.

pip install graphene-stubs
INSTALL
IMPORT
SIG · GRAPHENE-STUBS
G
graphene-stubs
type-stubspythonv0.16
Install
3.5s avg
Import
Disk
80MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.16 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 82.2MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.5s · import 0.000s · 81MB
80MB installed
● package 80MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

mypy_plugin
from graphene_plugin import mypy_plugin
plugins = graphene_stubs.mypy_plugin

Enable the mypy plugin and write a simple graphene schema. The stubs provide type inference for ObjectType, Field, etc.

# In mypy configuration file (e.g., mypy.ini): [mypy] plugins = graphene_stubs.mypy_plugin # Example graphene code the stubs will type-check: import graphene class Query(graphene.ObjectType): hello = graphene.String() def resolve_hello(self, info): return "world" schema = graphene.Schema(query=Query)
Debug
Known issues
gotchaThe mypy plugin must be enabled explicitly via mypy config; it is not activated by installing the package.
fix
Add 'plugins = graphene_stubs.mypy_plugin' to your mypy configuration file.
affects: all
gotchaType stubs are not automatically installed for graphene itself. Ensure graphene is installed as a dependency.
fix
Install graphene alongside graphene-stubs: pip install graphene graphene-stubs
affects: all
deprecatedThe package may not see frequent updates; consider using graphene built-in types or other stubs if support lags behind graphene releases.
fix
Monitor the repository for updates; if stubs become outdated, temporarily use # type: ignore or custom stubs.
affects: <=0.16
Upgrade
Version history
0.16latest on PyPI · released Sep 11, 2023
Audit
Dependencies
graphenerequiredgraphene-stubs is a type stub package for graphene
mypyoptionalmypy plugin requires mypy installed
Agent activity
36 hits · last 30 days
node
32
OpenAI (training)
1
Resources
graphene-stubs — pip install graphene-stubs · libregistry