Metadata-Version: 2.0
Name: bpmappers
Version: 0.9
Summary: bpmappers is a Python moudle that maps Python dictionary values and object properties to different dictionary.
Home-page: https://bpmappers.readthedocs.io/en/stable/
Author: BeProud Inc.
Author-email: tokibito@gmail.com
License: MIT License
Keywords: model,mapper,django
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Plugins
Classifier: Framework :: Django
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: six
Provides-Extra: develop
Requires-Dist: Django; extra == 'develop'
Requires-Dist: flake8; extra == 'develop'
Requires-Dist: pytest; extra == 'develop'
Requires-Dist: pytest-django; extra == 'develop'
Requires-Dist: pytest-pythonpath; extra == 'develop'
Requires-Dist: tox; extra == 'develop'
Provides-Extra: django
Requires-Dist: Django; extra == 'django'

=========
bpmappers
=========

|build-status| |pypi| |docs|

bpmappers is a Python moudle that maps Python dictionary values and object properties to different dictionary.

Install
=======

Install using pip.

::

   $ pip install bpmappers

Usage
=====

An example of mapping an instance of the Person class to a dictionary:

.. doctest::

   >>> class Person:
   ...     def __init__(self, name, age):
   ...         self.name = name
   ...         self.age = age
   ...     def __repr__(self):
   ...         return "<Person name={}, age={}>".format(self.name, self.age)
   ...
   >>> p = Person("Spam", 25)
   >>> p
   <Person name=Spam, age=25>
   >>> from bpmappers import Mapper, RawField
   >>> class PersonMapper(Mapper):
   ...     mapped_name = RawField('name')
   ...     mapped_age = RawField('age')
   ...
   >>> PersonMapper(p).as_dict()
   OrderedDict([('mapped_name', 'Spam'), ('mapped_age', 25)])

Requirements
============

- Target Python version is 2.7, 3.4, 3.5, 3.6
- Django>=1.8 (If use Django support)

License
=======

This software is licensed under the MIT License.

Documentation
=============

The latest documentation is hosted at Read The Docs.

https://bpmappers.readthedocs.io/en/stable/

Develop
=======

This project is hosted at Github: https://github.com/beproud/bpmappers

Author
======

- BeProud, Inc

Maintainer
==========

- Shinya Okano <tokibito@gmail.com>

.. |build-status| image:: https://travis-ci.org/beproud/bpmappers.svg?branch=master
   :target: https://travis-ci.org/beproud/bpmappers
.. |docs| image:: https://readthedocs.org/projects/bpmappers/badge/?version=stable
   :target: https://bpmappers.readthedocs.io/en/stable/
.. |pypi| image:: https://badge.fury.io/py/bpmappers.svg
   :target: http://badge.fury.io/py/bpmappers


