Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Allows declaring marshmallow fields as annotations

Project Description

====================
marshmallow-annotations
====================

.. code-block:: python

from marshmallow_annotations import AnnotatedSchema
from marshmallow import fields

class BookSchema(AnnotatedSchema):
author: fields.String()
title: fields.String()
published: fields.Date()

book = dict(author='Anne Droid', title='Robots', published='3000-01-23')
BookSchema().dump(book).data
# {
# 'author': 'Anne Droid',
# 'title': 'Robots',
# 'published': date(3000, 1, 23)
# }

Install
=======

.. code-block:: bash

pip install marshmallow-annotations

Why?
====

Why not? Type annotations are pretty cool and so is marshmallow, it's like the chocolate peanut butter cup of data validation.

Release History

This version
History Node

1.0.0

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Hash SHA256 Hash Help Version File Type Upload Date
marshmallow_annotations-1.0.0-py3-none-any.whl
(3.8 kB) Copy SHA256 Hash SHA256
py3 Wheel Jun 18, 2017
marshmallow-annotations-1.0.0.tar.gz
(1.8 kB) Copy SHA256 Hash SHA256
Source Jun 18, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting