semvec/pypi-packages huggingface dataset:
django-jsonapi 1.0.7
Non-prohibitive, JSON API library for Django.
License: MIT

##### v1.0.0

Django JSON API Made Simple
===========================

No more forcing your JSON to be bound to models.

This is a JSON api framework, the way it should be.

- Simple
- Flexible / Dynamic
- Useful

The API framework uses Django Forms, so no more bull trying to validate input a certain way.

# !!! Get to the code !!!

How about this?

First: `pip install django-jsonapi`, ok now:


```language=python
from djsonapi import api, serial

@serial.serializer(User, mode="current_user")
def current_user_serializer(obj):
    return serial.serialize_model(obj, fields=("name", "email", "last_login", "date_joined"))
    
@serial.serializer(User, mode="public")
def public_user_serializer(obj):
    return serial.serialize_model(obj, fields=("name", "date_joined"))

@csrf_exempt
@api.login_required
@api.require_method("GET", "POST") # passes post/put down, 405's if method is incorrect
@api.post_form(forms.UserUpdateForm) # validates post/put data with form
def profile(request, form):
    if form:
        # form is guaranteed to be valid here
        user = form.save()
    else:
        user = request.user
    data = serial.serialize(user, mode="current_user")
    return api.ok(message="Hello World!", user=user)
```
The response could look like:
```
{
  "message": "Hello World!",
  "body": {
    "name": "Evan Leis",
    "last_login": "2014-04-09T22:48:21.957Z",
    "date_joined": "2014-04-09T22:47:08.153Z",
    "email": "foo@example.com",
  },
  "ok": true
}
```

For more code, see the example app.

**Important: make sure your serializers get loaded.**

Easiest way to do this is put them in a file called serial.py and in your app's `__init__.py`, load via
```
## myproj.myapp.__init__.py
from myproj.myapp.serial import *
```


## `djsonapi.serial`

Methods for serializing objects into dicts, and dicts into JSON.

## `djsonapi.api`

Methods for returning HttpResponses with JSON data.

License
----
The MIT License (MIT)

Copyright (c) 2014 Evan Leis

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
dl-package-test 0.0.13
A test package for dl-environment
License: MIT

A sample Python project
=======================

A sample project that exists as an aid to the `Python Packaging User Guide
<https://packaging.python.org>`_'s `Tutorial on Packaging and Distributing
Projects <https://packaging.python.org/en/latest/distributing.html>`_.

This projects does not aim to cover best practices for Python project
development as a whole. For example, it does not provide guidance or tool
recommendations for version control, documentation, or testing.

----

This is the README file for the project.

The file should use UTF-8 encoding and be written using ReStructured Text. It
will be used to generate the project webpage on PyPI and will be displayed as
the project homepage on common code-hosting services, and should be written for
that purpose.

Typical contents for this file would include an overview of the project, basic
usage examples, etc. Generally, including the project changelog in here is not
a good idea, although a simple "What's New" section for the most recent version
may be appropriate.
jsonschema_serialize_fork 2.1.1
Fork of Julian Berman's jsonschema to include support for serializing defaults
License: MIT

=========================
jsonschema_serialize_fork
=========================

This is a fork of the jsonschema 2.1.0dev to include support for serializing defaults.

You probably want the original ``jsonschema`` which is on `GitHub <http://github.com/Julian/jsonschema>`_.