Skip to main content
# OpenCrud Graphene Django implementation

## Usage

```python
import graphene
from graphene_django.types import DjangoObjectType

from django.contrib.auth import models as auth_models
from graphene import Node

from opencrud.connection import WithOpenCrudConnection
from opencrud.list import OpenCrudDjangoFilterListField
from opencrud.filter import OpenCrudDjangoFilterConnectionField
from opencrud.field import OpenCrudDjangoField


class User(DjangoObjectType):
@WithOpenCrudConnection(auth_models.User)
class Meta:
filter_fields = ('id', 'email', )
interfaces = (Node, )


class Query(graphene.ObjectType):
user = OpenCrudDjangoField(User)
users = OpenCrudDjangoFilterListField(User)
users_connection = OpenCrudDjangoFilterConnectionField(User)
```

## Contributing

After cloning this repo, ensure dependencies are installed by running:

```sh
pip install -e ".[test]"
```

After developing, the full test suite can be evaluated by running:

```sh
py.test opencrud --cov=opencrud # Use -v -s for verbose mode
```


Release files for graphene-django-opencrud 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for graphene-django-opencrud 1.0.0
File Size Uploaded
graphene-django-opencrud-1.0.0.tar.gz 8.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for graphene-django-opencrud 1.0.0
File Interpreter ABI Platform
graphene_django_opencrud-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 20.6 kB

Release files / graphene-django-opencrud-1.0.0.tar.gz

Download URL graphene-django-opencrud-1.0.0.tar.gz
Size 8.5 kB
Tags Source
SHA-256 checksum
How to use checksums
afe182dc21f876e623428280bab98ac67b018d899692860d55bd1a76380e928b
BLAKE2b-256 checksum
How to use checksums
e489dc3e744377c9bf078b179816e4c77d9c113f8ad2395e5fcc032909f1c8c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/3.5.2

Release files / graphene_django_opencrud-1.0.0-py3-none-any.whl

Download URL graphene_django_opencrud-1.0.0-py3-none-any.whl
Size 12.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aec74f0f0ff5e1fe3defbecf0ab1a18352d0cf52f397bbc33571b29de0924202
BLAKE2b-256 checksum
How to use checksums
050cac23e3cdbc9c162e76846a2f4906cb6a59ae98f671beee667644c96fe079
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/3.5.2

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page