All Projects → marshmallow-code → Marshmallow Jsonapi

marshmallow-code / Marshmallow Jsonapi

Licence: mit
JSON API 1.0 (https://jsonapi.org/) formatting with marshmallow

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Marshmallow Jsonapi

Awesome Python Models
A curated list of awesome Python libraries, which implement models, schemas, serializers/deserializers, ODM's/ORM's, Active Records or similar patterns.
Stars: ✭ 124 (-38.92%)
Mutual labels:  validation, serialization, deserialization
Marshmallow
A lightweight library for converting complex objects to and from simple Python datatypes.
Stars: ✭ 5,857 (+2785.22%)
Mutual labels:  validation, serialization, deserialization
Flask Smorest
DB agnostic framework to build auto-documented REST APIs with Flask and marshmallow
Stars: ✭ 317 (+56.16%)
Mutual labels:  rest-api, marshmallow, flask
marshmallow-validators
Use 3rd-party validators (e.g. from WTForms and colander) with marshmallow
Stars: ✭ 24 (-88.18%)
Mutual labels:  serialization, deserialization, marshmallow
Webargs
A friendly library for parsing HTTP request arguments, with built-in support for popular web frameworks, including Flask, Django, Bottle, Tornado, Pyramid, webapp2, Falcon, and aiohttp.
Stars: ✭ 1,145 (+464.04%)
Mutual labels:  marshmallow, validation, flask
hapic
Input/Output/Error management for your python controllers with Swagger doc generation
Stars: ✭ 18 (-91.13%)
Mutual labels:  serialization, validation, deserialization
Typesystem
Data validation, serialization, deserialization & form rendering. 🔢
Stars: ✭ 416 (+104.93%)
Mutual labels:  validation, serialization, deserialization
Jsonapi Rb
Efficiently produce and consume JSON API documents.
Stars: ✭ 219 (+7.88%)
Mutual labels:  json-api, serialization, deserialization
Python Api Development Fundamentals
Develop a full-stack web application with Python and Flask
Stars: ✭ 44 (-78.33%)
Mutual labels:  marshmallow, serialization, flask
Apispec
A pluggable API specification generator. Currently supports the OpenAPI Specification (f.k.a. the Swagger specification)..
Stars: ✭ 831 (+309.36%)
Mutual labels:  rest-api, marshmallow, flask
Django Rest Marshmallow
Marshmallow schemas for Django REST framework
Stars: ✭ 198 (-2.46%)
Mutual labels:  rest-api, marshmallow, serialization
Loopback Component Jsonapi
JSONAPI support for loopback.
Stars: ✭ 104 (-48.77%)
Mutual labels:  json-api, serialization, deserialization
Flasgger
Easy OpenAPI specs and Swagger UI for your Flask API
Stars: ✭ 2,825 (+1291.63%)
Mutual labels:  rest-api, marshmallow, flask
Safrs
SqlAlchemy Flask-Restful Swagger Json:API OpenAPI
Stars: ✭ 255 (+25.62%)
Mutual labels:  rest-api, json-api, flask
Jsonapi Rails
Rails gem for fast jsonapi-compliant APIs.
Stars: ✭ 242 (+19.21%)
Mutual labels:  json-api, serialization, deserialization
Colander
A serialization/deserialization/validation library for strings, mappings and lists.
Stars: ✭ 408 (+100.99%)
Mutual labels:  validation, serialization, deserialization
Schematics
Project documentation: https://schematics.readthedocs.io/en/latest/
Stars: ✭ 2,461 (+1112.32%)
Mutual labels:  validation, serialization, deserialization
Flask Marshmallow
Flask + marshmallow for beautiful APIs
Stars: ✭ 666 (+228.08%)
Mutual labels:  rest-api, marshmallow, flask
Flask Restplus Server Example
Real-life RESTful server example on Flask-RESTplus
Stars: ✭ 1,240 (+510.84%)
Mutual labels:  rest-api, marshmallow, flask
Typical
Typical: Fast, simple, & correct data-validation using Python 3 typing.
Stars: ✭ 111 (-45.32%)
Mutual labels:  validation, serialization, deserialization

marshmallow-jsonapi


.. image:: https://badgen.net/pypi/v/marshmallow-jsonapi :target: https://pypi.org/project/marshmallow-jsonapi/ :alt: PyPI version

.. image:: https://dev.azure.com/sloria/sloria/_apis/build/status/marshmallow-code.marshmallow-jsonapi?branchName=dev :target: https://dev.azure.com/sloria/sloria/_build/latest?definitionId=7&branchName=dev :alt: Build status

.. image:: https://readthedocs.org/projects/marshmallow-jsonapi/badge/ :target: https://marshmallow-jsonapi.readthedocs.io/ :alt: Documentation

.. image:: https://badgen.net/badge/marshmallow/3 :target: https://marshmallow.readthedocs.io/en/latest/upgrading.html :alt: marshmallow 3 compatible

.. image:: https://badgen.net/badge/code%20style/black/000 :target: https://github.com/ambv/black :alt: code style: black

Homepage: http://marshmallow-jsonapi.readthedocs.io/

JSON API 1.0 (https://jsonapi.org <http://jsonapi.org/>) formatting with marshmallow <https://marshmallow.readthedocs.io>.

marshmallow-jsonapi provides a simple way to produce JSON API-compliant data in any Python web framework.

.. code-block:: python

from marshmallow_jsonapi import Schema, fields


class PostSchema(Schema):
    id = fields.Str(dump_only=True)
    title = fields.Str()

    author = fields.Relationship(
        "/authors/{author_id}", related_url_kwargs={"author_id": "<author.id>"}
    )

    comments = fields.Relationship(
        "/posts/{post_id}/comments",
        related_url_kwargs={"post_id": "<id>"},
        # Include resource linkage
        many=True,
        include_resource_linkage=True,
        type_="comments",
    )

    class Meta:
        type_ = "posts"


post_schema = PostSchema()
post_schema.dump(post)
# {
#     "data": {
#         "id": "1",
#         "type": "posts"
#         "attributes": {
#             "title": "JSON API paints my bikeshed!"
#         },
#         "relationships": {
#             "author": {
#                 "links": {
#                     "related": "/authors/9"
#                 }
#             },
#             "comments": {
#                 "links": {
#                     "related": "/posts/1/comments/"
#                 }
#                 "data": [
#                     {"id": 5, "type": "comments"},
#                     {"id": 12, "type": "comments"}
#                 ],
#             }
#         },
#     }
# }

Installation

::

pip install marshmallow-jsonapi

Documentation

Full documentation is available at https://marshmallow-jsonapi.readthedocs.io/.

Requirements

  • Python >= 3.6

Project Links

License

MIT licensed. See the bundled LICENSE <https://github.com/marshmallow-code/marshmallow-jsonapi/blob/master/LICENSE>_ file for more details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].