python-graphene-django
Port variant py310
Summary Graphene Django integration (3.10)
Package version 3.1.5
Homepage https://github.com/graphql-python/graphene-django
Keywords python
Maintainer Python Automaton
License Not yet specified
Other variants v11
Ravenports Buildsheet | History
Ravensource Port Directory | History
Last modified 13 AUG 2023, 17:55:46 UTC
Port created 01 JAN 2023, 17:21:46 UTC
Subpackage Descriptions
single # ![Graphene Logo] Graphene-Django [![build][build-image]][build-url] [![pypi][pypi-image]][pypi-url] [![Anaconda-Server Badge][conda-image]][conda-url] [![coveralls][coveralls-image]][coveralls-url] [build-image]: https://github.com/graphql-python/graphene-django/workflows/Tests/badge.svg [build-url]: https://github.com/graphql-python/graphene-django/actions [pypi-image]: https://img.shields.io/pypi/v/graphene-django.svg?style=flat [pypi-url]: https://pypi.org/project/graphene-django/ [coveralls-image]: https://coveralls.io/repos/github/graphql-python/graphene-django/badge.svg?branch=master [coveralls-url]: https://coveralls.io/github/graphql-python/graphene-django?branch=master [conda-image]: https://img.shields.io/conda/vn/conda-forge/graphene-django.svg [conda-url]: https://anaconda.org/conda-forge/graphene-django Graphene-Django is an open-source library that provides seamless integration between Django, a high-level Python web framework, and Graphene, a library for building GraphQL APIs. The library allows developers to create GraphQL APIs in Django quickly and efficiently while maintaining a high level of performance. ## Features * Seamless integration with Django models * Automatic generation of GraphQL schema * Integration with Django's authentication and permission system * Easy querying and filtering of data * Support for Django's pagination system * Compatible with Django's form and validation system * Extensive documentation and community support ## Installation To install Graphene-Django, run the following command: ``` pip install graphene-django ``` ## Configuration After installation, add 'graphene_django' to your Django project's `INSTALLED_APPS` list and define the GraphQL schema in your project's settings: ```python INSTALLED_APPS = [ # ... 'graphene_django', ] GRAPHENE = { 'SCHEMA': 'myapp.schema.schema' } ``` ## Usage To use Graphene-Django, create a `schema.py` file in your Django app directory and define your GraphQL types and queries: ```python import graphene from graphene_django import DjangoObjectType from .models import MyModel class MyModelType(DjangoObjectType): class Meta: model = MyModel class Query(graphene.ObjectType): mymodels = graphene.List(MyModelType) def resolve_mymodels(self, info, **kwargs): return MyModel.objects.all() schema = graphene.Schema(query=Query) ``` Then, expose the GraphQL API in your Django project's `urls.py` file: ```python from django.urls import path from graphene_django.views import GraphQLView from . import schema urlpatterns = [ # ... path('graphql/', GraphQLView.as_view(graphiql=True)), # Given that schema path is defined in GRAPHENE['SCHEMA'] in your settings.py ] ``` ## Testing
Configuration Switches (platform-specific settings discarded)
PY310 ON Build using Python 3.10 PY311 OFF Build using Python 3.11
Package Dependencies by Type
Build (only) python-pip:single:py310
autoselect-python:single:standard
Build and Runtime python310:single:standard
Runtime (only) python-graphene:single:py310
python-graphql-core:single:py310
python-graphql-relay:single:py310
python-Django:single:py310
python-promise:single:py310
python-text-unidecode:single:py310
Download groups
main mirror://PYPIWHL/77/4e/5f3306f1664a4c3d77f21545914c866a66c419fdba1f43a62930a2ae57e7
Distribution File Information
2e42742fae21fa50e514f3acae26a9bc6cb5e51c179a97b3db5390ff258ca816 110165 graphene_django-3.1.5-py2.py3-none-any.whl
Ports that require python-graphene-django:py310
NetBox:standard Flexible IPAM and DCIM tool with plugin support
python-django-graphiql-debug-toolbar:py310 Django Debug Toolbar for GraphiQL IDE (3.10)