$npx skillfedfor your agent

graphene-pydantic

Graphene Pydantic integration

Worth itPyPI LibrariesReleased Feb 2024501.9K downloads / moApache-2.0Pure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — graphene_pydantic-0.6.1-py3-none-any.whl
v0.6.1 · released 2024-02-01 · Python >=3.8,<4.0 · 2 runtime deps: graphene, pydantic

Yes. The package is actively maintained, has low install friction, carries a permissive license, and solves a real problem for teams already using Pydantic. It supports current Python versions (3.8–3.12) and has no known vulnerabilities. Install it if you're building GraphQL APIs on top of existing Pydantic models and want to avoid duplicating type definitions.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Low friction: pure Python wheel with only two runtime dependencies (graphene and pydantic).
  • Actively maintained with recent commits; last release was in February 2024.

License · maintenance · safety

Apache-2.0 (permissive) — Apache-2.0 is permissive; you can use this package freely in commercial and open-source projects with minimal restrictions.

last release 2024-02-01 (925 days) · last repo commit 2026-05-22 · 249 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 501,910 downloads/mo, #6,312 on PyPI

Verify before relying

pip install graphene-pydantic

import pydantic
from graphene_pydantic import PydanticObjectType
import graphene

class PersonModel(pydantic.BaseModel):
    name: str

class Person(PydanticObjectType):
    class Meta:
        model = PersonModel

class Query(graphene.ObjectType):
    people = graphene.List(Person)

schema = graphene.Schema(query=Query)
  • Whether the package handles all Pydantic field types (e.g., custom validators, computed fields) without manual workarounds.
  • Performance characteristics when converting large or deeply nested Pydantic models to GraphQL schemas.
  • Compatibility with recent versions of graphene and pydantic beyond the classifiers listed.
Same gist for agents: .md · .json

What it is and what it does

graphene-pydantic is a bridge between Pydantic and Graphene that lets you define GraphQL schemas directly from your Pydantic models. Instead of writing separate GraphQL type definitions, you annotate your Pydantic model and wrap it in a PydanticObjectType or PydanticInputObjectType, and the package generates the corresponding GraphQL types automatically. This is useful when you already have Pydantic models for validation and want to expose them via GraphQL without duplicating type definitions.

The package supports both output types (for queries) and input types (for mutations), field exclusion, custom resolve functions, and forward declarations with circular references. It inherits from Graphene's ObjectType, so you can extend generated types with custom fields and resolvers. Known limitations include inability to handle GraphQL-incompatible Pydantic fields like mappings (dictionaries) and some caveats around union types and Python version compatibility.

Use it for

  • Build a GraphQL API from existing Pydantic models without redefining types in Graphene.
  • Create GraphQL input types for mutations that accept Pydantic model data.
  • Extend auto-generated GraphQL types with custom resolve functions for computed fields.
  • Rapidly prototype GraphQL services where Pydantic validation and GraphQL schema are kept in sync.
  • Handle forward declarations and circular model references in GraphQL schemas.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

The package is actively maintained, has low install friction, carries a permissive license, and solves a real problem for teams already using Pydantic. It supports current Python versions (3.8–3.12) and has no known vulnerabilities. Install it if you're building GraphQL APIs on top of existing Pydantic models and want to avoid duplicating type definitions.

Install

graphene-pydantic on PyPI

Before you install

Low friction: pure Python wheel with only two runtime dependencies (graphene and pydantic). Actively maintained with recent commits; last release was in February 2024.

License in practice

Apache-2.0 is permissive; you can use this package freely in commercial and open-source projects with minimal restrictions.

Quickstart

pip install graphene-pydantic

import pydantic
from graphene_pydantic import PydanticObjectType
import graphene

class PersonModel(pydantic.BaseModel):
    name: str

class Person(PydanticObjectType):
    class Meta:
        model = PersonModel

class Query(graphene.ObjectType):
    people = graphene.List(Person)

schema = graphene.Schema(query=Query)

Verify before relying

  • Whether the package handles all Pydantic field types (e.g., custom validators, computed fields) without manual workarounds.
  • Performance characteristics when converting large or deeply nested Pydantic models to GraphQL schemas.
  • Compatibility with recent versions of graphene and pydantic beyond the classifiers listed.

Package facts

LicenseApache-2.0 permissive
Python supportSupports the current Python release >=3.8,<4.0
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
graphenepydantic
MaintenanceActively maintained 925 days since the last release
Last repo commit
First released
Downloads501,910 / month, #6,312 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 3 - AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries

Evidence: graphene_pydantic-0.6.1-py3-none-any.whl

Tags

Capabilities
pydantic to graphqlgraphene pydantic integrationgraphql schema from pydantic modelspydantic graphql typesgraphql object type generatorpydantic model graphqlgraphene pydantic objecttype
Topics
graphql-integrationschema-generation
PyPI keywords
apigraphqlprotocolrestrelaygraphenepydanticmodel

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “pydantic to graphql”

  • graphene-pydanticConverts Pydantic models into GraphQL object types and input types…
  • graphql-queryBuilds GraphQL query strings programmatically in Python using a…
  • ariadne-codegenGenerates fully typed, asynchronous Python GraphQL clients from a…

Give your agent the search over MCP, or paste the wish link into any chat.

More Libraries packages

urllib3 Worth it
PyPI · Libraries · released May 2026

urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.

MITpure Python · 3.10+
1.8Bdownloads / mo
requests Worth it
PyPI · Libraries · released May 2026

Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.

Apache-2.0pure Python · 3.10+
1.8Bdownloads / mo
pluggy Worth it
PyPI · Libraries · released May 2025

Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.

Install it if you're building an extensible application or framework.

MITpure Python · 3.9+aging
1.3Bdownloads / mo
python-dateutil Worth it
PyPI · Libraries · released Mar 2024

Provides parsing, arithmetic, and recurrence rule computation for dates and times, with timezone support and iCalendar RFC compliance.

Install it if you need to parse flexible date strings, compute relative dates, handle timezones, or work with recurrence rules—it's the de facto choice for these tasks.

Apache-2.0pure Python
1.2Bdownloads / mo
six With conditions
PyPI · Libraries · released Dec 2024

Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.

MITpure Python
1.2Bdownloads / mo
pytest Worth it
PyPI · Libraries · released Jun 2026

pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.

MITpure Python · 3.10+
1.1Bdownloads / mo

See also graphene-sqlalchemy · graphene · sparkdantic · graphene-django · pydantic-to-pyarrow · graphql-query · datamodel-code-generator · pydantic-factories · starlette-graphene3 · graphene-file-upload