Metadata-Version: 2.4
Name: tarxemo-django-graphene-utils
Version: 0.1.1
Summary: Shared Django Graphene utilities and DTOs for efficient API development
Home-page: https://github.com/tarxemo/tarxemo-django-graphene-utils
Author: TarXemo
Classifier: Programming Language :: Python :: 3
Classifier: Framework :: Django
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: Django>=3.2
Requires-Dist: graphene-django<3.0,>=2.15
Requires-Dist: graphene<3.0,>=2.1
Requires-Dist: graphql-core<3.0,>=2.0
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# TarXemo Django Graphene Utils

A utility collection for building standardized GraphQL APIs with Django and Graphene.

## Installation

```bash
pip install tarxemo-django-graphene-utils
```

## Usage

### Standardized Responses

```python
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

```python
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

1. Build the package:
   ```bash
   python setup.py sdist bdist_wheel
   ```

2. Upload to PyPI (requires twine):
   ```bash
   twine upload dist/*
   ```
