somme serialization
Project description
Library json_serializer and xml_serializer
This library serializes json and xml format files.
Installation
pip install Artur_serializer
Get Started
import math from Artur_serializer.serializer_zavod import zavod
def my_decor(meth): def inner(*args, **kwargs): print('I am in my_decor') return meth(*args, **kwargs)
return inner
class A: x = 10
@my_decor
def my_sin(self, c):
return math.sin(c * self.x)
@staticmethod
def stat():
return 145
def __str__(self):
return 'AAAAA'
def __repr__(self):
return 'AAAAA'
class B: def init(self, a, b): self.a = a self.b = b
@classmethod
def class_meth(cls):
return math.pi
@property
def prop(self):
return self.a * self.b
class C(A, B): pass
ser = zavod.create_zavod('json')
C_ser = ser.dumps(C) C_des = ser.loads(C_ser)
c = C(1, 2) c_ser = ser.dumps(c) c_des = ser.loads(c_ser)
print(c_des) print(c_des.x) print(c_des.my_sin(10)) print(c_des.prop) print(C_des.stat()) print(c_des.class_meth())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file Artur_serializer-0.1.0.tar.gz.
File metadata
- Download URL: Artur_serializer-0.1.0.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54ab2a5628bc5d639de801a0f1e3482d24b1c9cf8cf5de6b54c4357defb069e0
|
|
| MD5 |
3439f7574f8a2a34416de671c593da42
|
|
| BLAKE2b-256 |
7e9e89dfabd0dfbe29be69ee169666552b087d98533c732fc8be78ea2c457d24
|
File details
Details for the file Artur_serializer-0.1.0-py3-none-any.whl.
File metadata
- Download URL: Artur_serializer-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ffc9f5b1218d38e7f4845729e92b3b3d99ae1083b4c1b5efe479616ed477207
|
|
| MD5 |
5b6b5b0bf026bfe37f1fa78a3ed610ec
|
|
| BLAKE2b-256 |
ead147b93ec9e5902fb25db7b0f2b5047b8eeedf487b58c0d0a6dea8e209380a
|