Metadata-Version: 1.1
Name: pystrainer
Version: 0.0.2
Summary: Fast functional serializers
Home-page: http://github.com/voidfiles/strainer
Author: Alex Kessinger
Author-email: voidfiles@gmail.com
License: Apache 2.0
Description: Strainer: Fast Functional Serializers
        =====================================
        
        .. image:: https://img.shields.io/pypi/v/pystrainer.svg
            :target: https://pypi.python.org/pypi/pystrainer
        
        Strainer is a different take on serialization and validation in python.
        It utilizes a functional style over inheritance.
        
        An example of Strainer, the example has been borrowed from `Marshmallow <https://marshmallow.readthedocs.io/en/latest/>`_
        
        .. code-block:: python
        
            artist_serializer = create_serializer(
              field('name')
            )
        
            album_schema = create_serializer(
              field('title'),
              field('release_date'),
              child('artist', serializer=artist_serializer)
            )
        
            class Artist(object):
                def __init__(self, name):
                    self.name = name
        
            class Album(object):
                def __init__(self, title, release_date, artist):
                    self.title = title
                    self.release_date = release_date
                    self.artist = artist
        
            bowie = Artist(name='David Bowie')
            album = Album(
                artist=bowie,
                title='Hunky Dory',
                release_date=date(1971, 12, 17)
            )
        
            simple_data = album_schema.to_representation({}, album)
        
            pprint.pprint(simple_data)
        
            # {'artist': {'name': 'David Bowie'},
            #  'release_date': datetime.date(1971, 12, 17),
            #  'title': 'Hunky Dory'}
        
        
        Installation
        ------------
        
        To install Strainer, simply:
        
        .. code-block:: bash
        
            $ pip install pystrainer
            ✨🍰✨
        
        Satisfaction, guaranteed.
        
        
        .. :changelog:
        
        Release History
        ---------------
        
        0.0.1 (2016-11-23)
        ++++++++++++++++++
        
        * Birth
        
Platform: UNKNOWN
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python
