python-strawberry-graphql-django
Port variant v14
Summary Strawberry GraphQL Django extension (3.14)
Package version 0.70.1
Homepage https://github.com/strawberry-graphql/strawberry-django
Keywords python
Maintainer Python Automaton
License Not yet specified
Other variants v13
Ravenports Buildsheet | History
Ravensource Port Directory | History
Last modified 09 DEC 2025, 14:30:40 UTC
Port created 14 JAN 2025, 19:34:39 UTC
Subpackage Descriptions
single # Strawberry GraphQL Django Integration [CI] [Coverage] [PyPI] [Downloads] ![PyPI - Python Version] [**Documentation**] | [**Discord**] Strawberry GraphQL Django integration provides powerful tools to build GraphQL APIs with Django. Automatically generate GraphQL types, queries, mutations, and resolvers from your Django models with full type safety. ## Installation ```shell pip install strawberry-graphql-django ``` ## Features - 🍓 **Automatic Type Generation** - Generate GraphQL types from Django models with full type safety - 🔍 **Advanced Filtering** - Powerful filtering system with lookups (contains, exact, in, etc.) - 📄 **Pagination** - Built-in offset and cursor-based (Relay) pagination - 📊 **Ordering** - Sort results by any field with automatic ordering support - 🔐 **Authentication & Permissions** - Django auth integration with flexible permission system - ✨ **CRUD Mutations** - Auto-generated create, update, and delete mutations with validation - ⚡ **Query Optimizer** - Automatic `select_related` and `prefetch_related` to prevent N+1 queries - 🐍 **Django Integration** - Works with Django views (sync and async), forms, and validation - 🐛 **Debug Toolbar** - GraphiQL integration with Django Debug Toolbar for query inspection ## Quick Start ```python # models.py from django.db import models class Fruit(models.Model): name = models.CharField(max_length=20) color = models.ForeignKey("Color", on_delete=models.CASCADE, related_name="fruits") class Color(models.Model): name = models.CharField(max_length=20) ` `python # types.py import strawberry_django from strawberry import auto from . import models @strawberry_django.type(models.Fruit) class Fruit: id: auto name: auto color: "Color" @strawberry_django.type(models.Color) class Color: id: auto name: auto fruits: list[Fruit] ` `python # schema.py import strawberry import strawberry_django from strawberry_django.optimizer import DjangoOptimizerExtension from .types import Fruit @strawberry.type class Query: fruits: list[Fruit] = strawberry_django.field() schema = strawberry.Schema( query=Query, extensions=[DjangoOptimizerExtension], ) ` `python # urls.py from django.urls import path from strawberry.django.views import AsyncGraphQLView from .schema import schema urlpatterns = [ path("graphql/", AsyncGraphQLView.as_view(schema=schema)), ]
Configuration Switches (platform-specific settings discarded)
PY313 OFF Build using Python 3.13 PY314 ON Build using Python 3.14
Package Dependencies by Type
Build (only) python314:dev:std
python-pip:single:v14
autoselect-python:single:std
Build and Runtime python314:primary:std
Runtime (only) python-asgiref:single:v14
python-Django:single:v14
python-strawberry-graphql:single:v14
Download groups
main mirror://PYPIWHL/3f/1d/b7046e74a9680c79d2695b7aab4fa5abe60f8a7e3fe7a699db17611a21a3
Distribution File Information
4dbe72069406ce8f4242bde6030ef0bec54ef49db9cd140baac3cf6af6d5a9b3 107929 python-src/strawberry_graphql_django-0.70.1-py3-none-any.whl
Ports that require python-strawberry-graphql-django:v14
No other ports depend on this one.