Metadata-Version: 2.1
Name: serobj
Version: 0.0.1
Summary: Python objects serialization
Home-page: https://github.com/serobj/serobj-python
Author: Vadim Sharay
Author-email: vadimsharay@gmail.com
License: Apache License, Version 2.0
Keywords: serialization representation format serobj syrup
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: System :: Distributed Computing
Classifier: Topic :: Utilities
Requires-Python: ~=3.5
Description-Content-Type: text/markdown
Requires-Dist: cerberus (~=1.3)

<!--
 Copyright 2020 Vadim Sharay <vadimsharay@gmail.com>

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 -->

# Serobj

[![License](http://img.shields.io/:license-Apache%202-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.txt)


_Serobj_ is a library for serializing and de-serializing program objects. 



## Getting started

Run ``pip install serobj`` to install the latest stable version from 
[PyPI](https://pypi.python.org/pypi/serobj). 


### Example:

```
import json
import serobj

def print_fn(self, *args):
    print(*args)

class A:
    print_fn = print_fn

    def __init__(self):
        self.some_attr = 1, 2, 3


# -------------- dump --------------

obj = A()
data = serobj.dumps(obj)

with open("A.json", "w") as f:
    json.dump(data, f, indent=4)


# -------------- load --------------

with open("A.json", "r") as f:
    data = json.load(f)

obj = serobj.loads(data)
obj.print_fn(*obj.some_attr) # 1 2 3

```


