semvec/pypi-packages huggingface dataset:
django-custom-anonymous 0.5.0
Library provides customization of AnonymousUser in Django
License: BSD

django-custom-anonymous
=======================

.. figure:: https://travis-ci.org/bugov/django-custom-anonymous.svg?branch=master

Library provides customization of AnonymousUser.

Works with Python >= 2.6, >= 3.2, Django >= 1.5, >= 2.0.

Installation
------------

.. code:: bash

    pip install django-custom-anonymous


Customization
-------------

Add to `settings`:

.. code:: python

    AUTH_ANONYMOUS_MODEL = 'your_app.module.CustomAnonymousUser'


Add to middlewares:

.. code:: python

    MIDDLEWARE = (
    ...
        'custom_anonymous.middleware.AuthenticationMiddleware',
    ...
    )


Create your own anonymous (for example):

.. code:: python

    from django.contrib.auth.models import AnonymousUser as DjangoAnonymousUser
    ...
    class CustomAnonymousUser(DjangoAnonymousUser):
        ip = None

        def __init__(self, request):
            self.ip = request.META.get('REMOTE_ADDR')
            super(AnonymousUser, self).__init__()
djangorestframework-orjson 0.1.3
Provides parser and renderer support for orjson library
License: BSD
Requires Python: >=3.5.*

djangorestframework-orjson
======================================

|build-status-image| |pypi-version|

Overview
--------

Provides parser and renderer support for orjson library

Requirements
------------

-  Python (3.5, 3.6, 3.7)
-  Django (1.11, 2.0, 2.1)
-  Django REST Framework (3.6, 3.7, 3.8, 3.9)

Installation
------------

Install using ``pip``\ …

.. code:: bash

    $ pip install djangorestframework-orjson

Example
-------

You can use this library by adding the following lines to your settings file:

.. code:: python

    REST_FRAMEWORK = {
        'DEFAULT_RENDERER_CLASSES': (
            'rest_framework_orjson.renderers.ORJSONRenderer',
        ),
        'DEFAULT_PARSER_CLASSES': (
            'rest_framework_orjson.parsers.ORJSONParser',
        ),
    }

Testing
-------

Install testing requirements.

.. code:: bash

    $ pip install -r requirements.txt

Run with runtests.

.. code:: bash

    $ ./runtests.py

You can also use the excellent `tox`_ testing tool to run the tests
against all supported versions of Python and Django. Install tox
globally, and then simply run:

.. code:: bash

    $ tox

.. _tox: http://tox.readthedocs.org/en/latest/

.. |build-status-image| image:: https://secure.travis-ci.org/mauricioabreu/django-rest-framework-orjson.svg?branch=master
   :target: http://travis-ci.org/mauricioabreu/django-rest-framework-orjson?branch=master
.. |pypi-version| image:: https://img.shields.io/pypi/v/djangorestframework-orjson.svg
   :target: https://pypi.python.org/pypi/djangorestframework-orjson