Serobj
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.
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
Metadata
Release files for serobj 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| serobj-0.0.3.tar.gz | 14.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| serobj-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 32.0 kB
Release files / serobj-0.0.3.tar.gz
| Download URL | serobj-0.0.3.tar.gz |
|---|---|
| Size | 14.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5920dd1fe0f6b5784b3425ba08eeacccaa4d664ab5946803648fefb3c0b36558
|
|
BLAKE2b-256 checksum How to use checksums |
6004422ef84f12b1398826c9ea53b0ad89f584448b7d30494c3613305f769675
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/2.7.17
|
Release files / serobj-0.0.3-py3-none-any.whl
| Download URL | serobj-0.0.3-py3-none-any.whl |
|---|---|
| Size | 17.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
510c22f6373fe72465ae1426573572588f9078987270d242cdf869e47c464e68
|
|
BLAKE2b-256 checksum How to use checksums |
5e281c890c87b490e2abfeabce21df1da920d9ce7e6e9d7c510ee248c94ac841
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/2.7.17
|