Metadata-Version: 2.1
Name: python-simple-dto
Version: 0.0.1
Summary: provides DTO object for object-like experience with dicts
Home-page: https://github.com/GranderStark/python-simple-dto
Author: Lev Subbotin
Author-email: subveles@gmail.com
License: MIT
Description: |License| |Release| |Supported versions| |Code Coverage| |Build Status Travis CI|
        
        python-simple-dto
        =================
        
        Dict, that behaves like an object.
        
        To achieve this BasicDTO and DTO were introduced.
        They brings object-like attribute access appearance to dicts.
        BasicDTO more suits for "flat" dict and DTO - for more complex.
        
        This Package doesn't provides validation(there are more suitable tools today) and
        "fromstring" functionality (single responsibility, you should load data by your own)
        
        Example of usage
        ----------------
        DTO
        ^^^^^
        .. code:: python
        
            >>> from src.python_simple_dto.dto import DTO
            >>> test_dict = {
            ...     "users": [{"name": "Alex", "age": 29}, {"name": "Russel", "age": 19}]
            ... }
            >>> test_dto
            {'users': [{'name': 'Alex', 'age': 29}, {'name': 'Russel', 'age': 19}]}
            >>> test_dto.users
            [{'name': 'Alex', 'age': 29}, {'name': 'Russel', 'age': 19}]
            >>>test_dto.roles = ["guest", "user", "moderator"]
            >>>test_dto
            {'users': [{'name': 'Alex', 'age': 29}, {'name': 'Russel', 'age': 19}], 'roles': ['guest', 'user', 'moderator']}
            >>>test_dto.roles
            ['guest', 'user', 'moderator']
            >>>test_dto["roles"]
            ['guest', 'user', 'moderator']
        
        
        .. |Release| image:: https://img.shields.io/github/release/GranderStark/python-simple-dto.svg
           :target: https://github.com/GranderStark/python-simple-dto/releases
        .. |Supported versions| image:: https://img.shields.io/pypi/pyversions/python-simple-dto.svg
           :target: https://pypi.org/project/python-simple-dto/
        .. |Code Coverage| image:: https://codecov.io/gh/GranderStark/python-simple-dto/branch/master/graph/badge.svg
            :target: https://codecov.io/gh/GranderStark/python-simple-dto
        .. |Build Status Travis CI| image:: https://travis-ci.com/GranderStark/python-simple-dto.svg?branch=master
            :target: https://travis-ci.com/GranderStark/python-simple-dto
        .. |License| image:: https://img.shields.io/badge/License-MIT-yellow.svg
            :target:  https://opensource.org/licenses/MIT
        
Keywords: dto,data transfer object
Platform: any
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Operating System :: OS Independent
Classifier: Topic :: Text Processing
Requires-Python: >=3.5
Description-Content-Type: text/x-rst
