Shared Django Graphene utilities and DTOs for efficient API development
Project description
TarXemo Django Graphene Utils
Shared Django Graphene utilities and DTOs for efficient API development. This package provides standardized response builders, pagination helpers, and common GraphQL types.
Installation
pip install tarxemo-django-graphene-utils
Usage
Standardized Responses
from tarxemo_django_graphene_utils import build_success_response, build_error
def resolve_something(root, info):
if success:
return build_success_response("Operation successful")
return build_error("Something went wrong")
Pagination
from tarxemo_django_graphene_utils import get_paginated_and_non_paginated_data
def resolve_items(root, info, **kwargs):
return get_paginated_and_non_paginated_data(
model=MyModel,
filtering_object=kwargs,
graphene_type=MyModelType
)
Building and Publishing
-
Build the package:
python setup.py sdist bdist_wheel
-
Upload to PyPI (requires twine):
twine upload dist/*
tarxemo-django-graphene-utils
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tarxemo_django_graphene_utils-0.1.2.tar.gz.
File metadata
- Download URL: tarxemo_django_graphene_utils-0.1.2.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e4f83a4bc872e15d7e209a4f3f0b832d5046da010afe663772e66aa69b64be9
|
|
| MD5 |
2a627e9ef6bc70718c89f53b71a14adb
|
|
| BLAKE2b-256 |
ab22fac08a36602d60bfe8c1f6aff8b5fa119d462ef41ef0665a687665161bf2
|
File details
Details for the file tarxemo_django_graphene_utils-0.1.2-py3-none-any.whl.
File metadata
- Download URL: tarxemo_django_graphene_utils-0.1.2-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8624f89661d65c83d1227a5e9455b18d2b8f07f99e36a9e9004b83d36257301
|
|
| MD5 |
b721be7258a715730aca63cd3ba3e657
|
|
| BLAKE2b-256 |
364905ebb666dde775128b9bbe3e90030cecee4682c740aa7677703295ea4693
|