semvec/pypi-packages huggingface dataset:
django-graphene-authentication 1.0.87
A variant of djhango-graphql-jwt that can work with federations
License: MIT
Keywords: django


Introduction
============

Customizable backend that uses graphql to authenticate users.
Abstraction of a graphql authentication mechanism. 
This is an modification of ``django-graphql-jwt``\ : I drop some functionalities that I did not care
and add capabilities that I needed.

Capabilities dropped:


* cookies;

Capabilities added:


* custom names and exceptions for authentication graphql mutrations/queries (needed for federations);
* ability to customize authentication mechanism;
* ability to work with graphene-federations when there are multiple authentication mechanisms;
* ability to be easily extended;

Motivation
==========

I needed to work with graphene federations wehere there werre multiple graphqlk mutations with names like 
"login", "me", "refresdh_tokens" and so on.
``django-graphql-jwt`` was more an hindrance than anything else since I need to authenticate via
a token rather tha username and password. In the end I ported the feature I needed from ``django-graphql-jwt``
and created this variant.

This apps does not rely on its oiwn authentication mechanism, but just relay all the information 
it knows about the graphql request to the auithentication backend. In this way **you** are in charge
to perform authentication.

Still, the package provides some standard authentication mechanism you can use. 

Installation
============

.. code-block::

   pip install django-graphql-apitoken

Configuration
=============

You need to add this app to the INSTALLED_APPS:

.. code-block::

   INSTALLED_APPS += "django_graphql_apitoken"

The second step is to create the authentication classes that graphene needs to be aware of.
Create a new file in your project root and add the following:
jsonapy 0.1.5.dev1
Library for dumping models into JSON:API
License: MIT
Requires Python: >=3.8,<4.0
Keywords: json,json-api,export,serialization

# JSON:APy - Loading and Dumping JSON:API in Python

> **WIP:** this library is still in early development phase.

`jsonapy` is a Python library for dumping models into
[JSON:API-compliant]("https://jsonapi.org/") JSON.

[![PyPi](https://img.shields.io/pypi/v/jsonapy?label=PyPi)](https://pypi.org/project/jsonapy/)
[![Python Version](https://img.shields.io/pypi/pyversions/jsonapy?label=Python)](https://pypi.org/project/jsonapy/)
![Tests & coverage](https://github.com/Arkelis/jsonapy/workflows/Tests%20&%20coverage/badge.svg)
[![codecov](https://codecov.io/gh/Arkelis/jsonapy/branch/master/graph/badge.svg?token=ZRF5RAF8NG)](https://codecov.io/gh/Arkelis/jsonapy)

## Installation

With `pip`:

```
pip install jsonapy
```

## Basic usage overview

This package lets you define models and dump them into dict with the JSON:API
structure. First, define a resource:

```python
import jsonapy

class PersonResource(jsonapy.BaseResource):
    id: int
    first_name: str
    last_name: str

    class Meta:
        resource_name = "person"
```

You can now dump an instance of this resource into JSON:API-structured dictionary:

```python
guido = PersonResource(id=1, first_name="Guido", last_name="Van Rossum")
data = guido.jsonapi_dict(required_attributes="__all__")
```

The resulting `data` dictionary can be represented by:

```python
{
    'type': 'person',
    'id': 1,
    'attributes': {
        'firstName': 'Guido', 
        'lastName': 'Van Rossum'
    }
}
```

## [Documentation](https://arkelis.github.io/jsonapy/jsonapy.html)

The complete documentation can be found **[here](https://arkelis.github.io/jsonapy/jsonapy.html)**.
It is built with [pdoc]("https://github.com/mitmproxy/pdoc").

## [Roadmap](https://github.com/Arkelis/jsonapy/projects/1)

Refer to [the project](https://github.com/Arkelis/jsonapy/projects/1) to view the roadmap-related issues.