graphene-django-extensions


Namegraphene-django-extensions JSON
Version 0.4.1 PyPI version JSON
download
home_pagehttps://mrthearman.github.io/graphene-django-extensions
SummaryExtensions for graphene-django
upload_time2024-03-21 06:40:35
maintainerNone
docs_urlNone
authorMatti Lamppu
requires_python<4,>=3.10
licenseMIT
keywords django graphene extensions graphql graphene-django mutations queries object_types fields
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Graphene Django Extensions

[![Coverage Status][coverage-badge]][coverage]
[![GitHub Workflow Status][status-badge]][status]
[![PyPI][pypi-badge]][pypi]
[![GitHub][licence-badge]][licence]
[![GitHub Last Commit][repo-badge]][repo]
[![GitHub Issues][issues-badge]][issues]
[![Downloads][downloads-badge]][pypi]
[![Python Version][version-badge]][pypi]

```shell
pip install graphene-django-extensions
```

---

**Documentation**: [https://mrthearman.github.io/graphene-django-extensions/](https://mrthearman.github.io/graphene-django-extensions/)

**Source Code**: [https://github.com/MrThearMan/graphene-django-extensions/](https://github.com/MrThearMan/graphene-django-extensions/)

**Contributing**: [https://github.com/MrThearMan/graphene-django-extensions/blob/main/CONTRIBUTING.md](https://github.com/MrThearMan/graphene-django-extensions/blob/main/CONTRIBUTING.md)

---

Extensions for writing GraphQL schemas with the [graphene-django] library with less boilerplate.

The main features are:

- A new ObjectType `DjangoNode`, which:
    - adds convenience methods for managing permissions for both the ObjectType and individual fields.
    - adds a hook for adding filtering to both single items and lists returned by the ObjectType.
    - adds convenience methods for creating Fields, ListFields, Nodes, and Connections for the ObjectType.
    - adds filterset filters automatically to ListFields created for the ObjectType.
    - automatically optimizes queries using [graphene-django-query-optimizer].

- A new MutationType `DjangoMutation`, which:
    - adds convenience methods for managing permissions.
    - adds `create`, `update` operation with serializers and `delete` operations with optional validation hook.
    - adds an option for custom model operations.
    - makes updates fully partial by default.
    - adds better error handling.

- A new ModelSerializer `NestingModelSerializer`, which:
    - adds pre and post save handlers for creating or updating related entities from nested serializer fields,
      all within a single transaction to ensure atomicity.
    - adds better handling of constraint integrity errors by finding `violation_error_message` from the constraint.
    - adds `get_or_default` method for finding default values for field validation.

- A new FilterSet `ModelFilterSet`, which:
    - changes the default filters for related fields to the custom `IntChoiceFilter` and `IntMultipleChoiceFilter`
      filters, which don't make database queries to check if the given primary keys for the filters actually
      correspond to existing rows for the database model.
    - adds a custom ordering filter automatically to all subclasses, with the default `pk` filter.
    - allows adding new ordering filters with the `Meta.order_by` attribute.
    - `order_by` fields are converted to enums for better autocompletion in GraphiQL.
    - allows combining multiple method filters with the `Meta.combination_methods` attribute.


[coverage-badge]: https://coveralls.io/repos/github/MrThearMan/graphene-django-extensions/badge.svg?branch=main
[status-badge]: https://img.shields.io/github/actions/workflow/status/MrThearMan/graphene-django-extensions/test.yml?branch=main
[pypi-badge]: https://img.shields.io/pypi/v/graphene-django-extensions
[licence-badge]: https://img.shields.io/github/license/MrThearMan/graphene-django-extensions
[repo-badge]: https://img.shields.io/github/last-commit/MrThearMan/graphene-django-extensions
[issues-badge]: https://img.shields.io/github/issues-raw/MrThearMan/graphene-django-extensions
[version-badge]: https://img.shields.io/pypi/pyversions/graphene-django-extensions
[downloads-badge]: https://img.shields.io/pypi/dm/graphene-django-extensions

[coverage]: https://coveralls.io/github/MrThearMan/graphene-django-extensions?branch=main
[status]: https://github.com/MrThearMan/graphene-django-extensions/actions/workflows/test.yml
[pypi]: https://pypi.org/project/graphene-django-extensions
[licence]: https://github.com/MrThearMan/graphene-django-extensions/blob/main/LICENSE
[repo]: https://github.com/MrThearMan/graphene-django-extensions/commits/main
[issues]: https://github.com/MrThearMan/graphene-django-extensions/issues

[graphene-django]: https://github.com/graphql-python/graphene-django
[graphene-django-query-optimizer]: https://github.com/MrThearMan/graphene-django-query-optimizer

            

Raw data

            {
    "_id": null,
    "home_page": "https://mrthearman.github.io/graphene-django-extensions",
    "name": "graphene-django-extensions",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4,>=3.10",
    "maintainer_email": null,
    "keywords": "django, graphene, extensions, graphql, graphene-django, mutations, queries, object_types, fields",
    "author": "Matti Lamppu",
    "author_email": "lamppu.matti.akseli@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/43/b0/260c988e9b640aeb7ea2d24770f8357a82ac1e3db1e978d35564f5b6f7b5/graphene_django_extensions-0.4.1.tar.gz",
    "platform": null,
    "description": "# Graphene Django Extensions\n\n[![Coverage Status][coverage-badge]][coverage]\n[![GitHub Workflow Status][status-badge]][status]\n[![PyPI][pypi-badge]][pypi]\n[![GitHub][licence-badge]][licence]\n[![GitHub Last Commit][repo-badge]][repo]\n[![GitHub Issues][issues-badge]][issues]\n[![Downloads][downloads-badge]][pypi]\n[![Python Version][version-badge]][pypi]\n\n```shell\npip install graphene-django-extensions\n```\n\n---\n\n**Documentation**: [https://mrthearman.github.io/graphene-django-extensions/](https://mrthearman.github.io/graphene-django-extensions/)\n\n**Source Code**: [https://github.com/MrThearMan/graphene-django-extensions/](https://github.com/MrThearMan/graphene-django-extensions/)\n\n**Contributing**: [https://github.com/MrThearMan/graphene-django-extensions/blob/main/CONTRIBUTING.md](https://github.com/MrThearMan/graphene-django-extensions/blob/main/CONTRIBUTING.md)\n\n---\n\nExtensions for writing GraphQL schemas with the [graphene-django] library with less boilerplate.\n\nThe main features are:\n\n- A new ObjectType `DjangoNode`, which:\n    - adds convenience methods for managing permissions for both the ObjectType and individual fields.\n    - adds a hook for adding filtering to both single items and lists returned by the ObjectType.\n    - adds convenience methods for creating Fields, ListFields, Nodes, and Connections for the ObjectType.\n    - adds filterset filters automatically to ListFields created for the ObjectType.\n    - automatically optimizes queries using [graphene-django-query-optimizer].\n\n- A new MutationType `DjangoMutation`, which:\n    - adds convenience methods for managing permissions.\n    - adds `create`, `update` operation with serializers and `delete` operations with optional validation hook.\n    - adds an option for custom model operations.\n    - makes updates fully partial by default.\n    - adds better error handling.\n\n- A new ModelSerializer `NestingModelSerializer`, which:\n    - adds pre and post save handlers for creating or updating related entities from nested serializer fields,\n      all within a single transaction to ensure atomicity.\n    - adds better handling of constraint integrity errors by finding `violation_error_message` from the constraint.\n    - adds `get_or_default` method for finding default values for field validation.\n\n- A new FilterSet `ModelFilterSet`, which:\n    - changes the default filters for related fields to the custom `IntChoiceFilter` and `IntMultipleChoiceFilter`\n      filters, which don't make database queries to check if the given primary keys for the filters actually\n      correspond to existing rows for the database model.\n    - adds a custom ordering filter automatically to all subclasses, with the default `pk` filter.\n    - allows adding new ordering filters with the `Meta.order_by` attribute.\n    - `order_by` fields are converted to enums for better autocompletion in GraphiQL.\n    - allows combining multiple method filters with the `Meta.combination_methods` attribute.\n\n\n[coverage-badge]: https://coveralls.io/repos/github/MrThearMan/graphene-django-extensions/badge.svg?branch=main\n[status-badge]: https://img.shields.io/github/actions/workflow/status/MrThearMan/graphene-django-extensions/test.yml?branch=main\n[pypi-badge]: https://img.shields.io/pypi/v/graphene-django-extensions\n[licence-badge]: https://img.shields.io/github/license/MrThearMan/graphene-django-extensions\n[repo-badge]: https://img.shields.io/github/last-commit/MrThearMan/graphene-django-extensions\n[issues-badge]: https://img.shields.io/github/issues-raw/MrThearMan/graphene-django-extensions\n[version-badge]: https://img.shields.io/pypi/pyversions/graphene-django-extensions\n[downloads-badge]: https://img.shields.io/pypi/dm/graphene-django-extensions\n\n[coverage]: https://coveralls.io/github/MrThearMan/graphene-django-extensions?branch=main\n[status]: https://github.com/MrThearMan/graphene-django-extensions/actions/workflows/test.yml\n[pypi]: https://pypi.org/project/graphene-django-extensions\n[licence]: https://github.com/MrThearMan/graphene-django-extensions/blob/main/LICENSE\n[repo]: https://github.com/MrThearMan/graphene-django-extensions/commits/main\n[issues]: https://github.com/MrThearMan/graphene-django-extensions/issues\n\n[graphene-django]: https://github.com/graphql-python/graphene-django\n[graphene-django-query-optimizer]: https://github.com/MrThearMan/graphene-django-query-optimizer\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Extensions for graphene-django",
    "version": "0.4.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/MrThearMan/graphene-django-extensions/issues",
        "Homepage": "https://mrthearman.github.io/graphene-django-extensions",
        "Repository": "https://github.com/MrThearMan/graphene-django-extensions"
    },
    "split_keywords": [
        "django",
        " graphene",
        " extensions",
        " graphql",
        " graphene-django",
        " mutations",
        " queries",
        " object_types",
        " fields"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "28fa92370be38a5571dbdb69b0137833c2cca88a0f075c43ba5f034b72f2a009",
                "md5": "dac8dd81eaf323ae2a57f6b555d4d622",
                "sha256": "be92e22793016a181c9d2093f348c16bc7fa68b73a5a8ab0f99a43cfbd2a9817"
            },
            "downloads": -1,
            "filename": "graphene_django_extensions-0.4.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "dac8dd81eaf323ae2a57f6b555d4d622",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4,>=3.10",
            "size": 51352,
            "upload_time": "2024-03-21T06:40:33",
            "upload_time_iso_8601": "2024-03-21T06:40:33.081230Z",
            "url": "https://files.pythonhosted.org/packages/28/fa/92370be38a5571dbdb69b0137833c2cca88a0f075c43ba5f034b72f2a009/graphene_django_extensions-0.4.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "43b0260c988e9b640aeb7ea2d24770f8357a82ac1e3db1e978d35564f5b6f7b5",
                "md5": "62cb60081a52d2f056d1e7d4fa1e051b",
                "sha256": "78cf46992ea97947853899ad4bd779af5c2b9a1ad6e7db4b94717759e4d3b314"
            },
            "downloads": -1,
            "filename": "graphene_django_extensions-0.4.1.tar.gz",
            "has_sig": false,
            "md5_digest": "62cb60081a52d2f056d1e7d4fa1e051b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4,>=3.10",
            "size": 39905,
            "upload_time": "2024-03-21T06:40:35",
            "upload_time_iso_8601": "2024-03-21T06:40:35.038398Z",
            "url": "https://files.pythonhosted.org/packages/43/b0/260c988e9b640aeb7ea2d24770f8357a82ac1e3db1e978d35564f5b6f7b5/graphene_django_extensions-0.4.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-21 06:40:35",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "MrThearMan",
    "github_project": "graphene-django-extensions",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "graphene-django-extensions"
}
        
Elapsed time: 0.29655s