Serialization for common Python objects.
Project description
Serialization for common Python objects.
Created to be used in a project, this package is published to github for ease of management and installation across different modules.
Installation
Install from PyPi
pip install serializor
Install from github
pip install git+https://github.com/AresJef/Serializor.git
Compatibility
Supports Python 3.10 and above.
Features
This package is designed to serialize Python object, and deserializes it back to the original (or compatiable) Python object.
Supported data types:
- string:
str
-> deserialize tostr
- float:
float
&numpy.float_
-> deserialize tofloat
- integer:
int
&numpy.int
&numpy.uint
-> deserialize toint
- boolean:
bool
&numpy.bool_
-> deserialize tobool
- None:
None
&numpy.nan
-> deserialize toNone
- datetime:
datetime.datetime
,pandas.Timestamp
&time.struct_time
-> deserialize todatetime.datetime
- datetime64:
numpy.datetime64
-> deserialize tonumpy.datetime64
- date:
datetime.date
-> deserialize todatetime.date
- time:
datetime.time
-> deserialize todatetime.time
- timedelta:
datetime.timedelta
&pandas.Timedelta
-> deserialize todatetime.timedelta
- timedelta64:
numpy.timedelta64
-> deserialize tonumpy.timedelta64
- decimal:
decimal.Decimal
-> deserialize todecimal.Decimal
- complex:
complex
&numpy.complex_
-> deserialize tocomplex
- bytes:
bytes
,bytearray
&numpy.bytes_
-> deserialize tobytes
- list:
list
of above supported data types -> deserialize tolist
- tuple:
tuple
of above supported data types -> deserialize totuple
- set:
set
&frozenset
of above supported data types -> deserialize toset
- dict:
dict
of above supported data types -> deserialize todict
- numpy.ndarray:
numpy.ndarray
of above supported data types -> deserialize tonp.ndarray
- pandas.Series:
pandas.Series
of above supported data types -> deserialize topandas.Series
- pandas.DataFrame:
pandas.DataFrame
of above supported data types -> deserialize topandas.DataFrame
Usage (Serialization & Deserialization)
from pandas import Series
from serializor import serialize, deserialize
obj = Series([1, 2, 3, 4, 5], name="test")
en = serialize(obj)
de = deserialize(en)
print(de)
0 1
1 2
2 3
3 4
4 5
Name: test, dtype: int64
Acknowledgements
serializor is based on several open-source repositories.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
serializor-1.0.4.tar.gz
(478.8 kB
view hashes)
Built Distributions
Close
Hashes for serializor-1.0.4-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d32174d3c43ca94295802ddd3a58bd5e6b1bbdb5b806afce917c0acbfd845d62 |
|
MD5 | acfca8f1f57294b53e654b82aeb99a6a |
|
BLAKE2b-256 | cc6d7e9d83a107b4bd57c95406ded6cdd1fcab2d19439d4c092d6a61f14fb0fd |
Close
Hashes for serializor-1.0.4-cp312-cp312-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc7fc063d7e984bc9d94f8dcc90bec531787e003783c4f91f6bc5b2f02bfe332 |
|
MD5 | 07e64233f752765f8032755efc4070e0 |
|
BLAKE2b-256 | eeac0e996e25527eb4923d00f4992f808eb51ec5cde257e6d6d4cc80993fb9f4 |
Close
Hashes for serializor-1.0.4-cp312-cp312-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89cc536e96b21d61f45a51f26e685810f3d75664f5036892d54741edc7bcb16a |
|
MD5 | 67ddaa00c6f4e3d3c3affacbd69fba0d |
|
BLAKE2b-256 | b17429f68973ea42c986209c54d41dc4e8a45922cfcdc00f8dc0e2b430dedcf7 |
Close
Hashes for serializor-1.0.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a6672720ed9474479a5305e406945b83d233667d6a306b4afca6926db9ba2c3 |
|
MD5 | 75816a67946ee19029b978cfcd2c87bf |
|
BLAKE2b-256 | e1dee0aec995555c043662a6b7253bc4bec720f6f327c7106830633ddad04324 |
Close
Hashes for serializor-1.0.4-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34c3c0d4a714a57bd3c02252eee503c82e686b1e889619069269b129f6e760d8 |
|
MD5 | 2557ed946347a4537d80e8a54b18dc0a |
|
BLAKE2b-256 | 99dd930cfd9eb9f2ef5ab06054ceba8c0e16755c7d0b9f1168c0f0d6763bd140 |
Close
Hashes for serializor-1.0.4-cp312-cp312-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f4ebd8f8902ccbaccc3f4636ec1d49899195276f1e312ce1493a2fe9917fcf3 |
|
MD5 | a9342551a585793980a4ff01140ecb3a |
|
BLAKE2b-256 | cf630e28c8b14f0598eb9180ba4f63c374e1b917bc20c37a31f931381495caf6 |
Close
Hashes for serializor-1.0.4-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a35fb8b3591e015bbcca336281a42cc8be06098fccfaab1789589c5ec322f87a |
|
MD5 | f5aabe5f240e7a8550e9daa0df86375e |
|
BLAKE2b-256 | 59839d40897c5fbf117bd31e1e442abd99ab5b731544a6acf71f4be4b377255f |
Close
Hashes for serializor-1.0.4-cp311-cp311-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5afc3cb6d9f026ecf7759f7533a93105da76d0d1d8fe213b66ca6787cfb1d281 |
|
MD5 | 42ae0550017e255a78024e4be405771e |
|
BLAKE2b-256 | d15198c6d211995c5e7a349fdb64a45b39b61b7aceb2fc90ccc126a22d4ef3c0 |
Close
Hashes for serializor-1.0.4-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93af76786aea3226cd0c1e8a22fd61ca59b149871843732f0eb89ebb5f07c7c0 |
|
MD5 | 625140497b0704871ed4238b07ba8330 |
|
BLAKE2b-256 | c30826b4730be28d19dcc9a7c4c4c0f490c54803ae5bd5767f16e6d9ccd7098c |
Close
Hashes for serializor-1.0.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d02018e8ffc2639fd3454031e8409f580d8b30b6f7cd1614e2cde3c2ed731242 |
|
MD5 | 94e681385596da60bac8f4ffa351a19f |
|
BLAKE2b-256 | 61fa71078e4f09aa569cd61ef35ef76864e57c083e7c3c2345ceb8f35a2b5b38 |
Close
Hashes for serializor-1.0.4-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b80c529248389c2abbc43a23d190e2c0fad793206c078dd11856ff42c5b126b0 |
|
MD5 | 914a75486a00a2f379151328df0ce91c |
|
BLAKE2b-256 | 433c01a458aff3df356ed0c98613d593fb9ca6ae34c4471fc5998ef626c9560d |
Close
Hashes for serializor-1.0.4-cp311-cp311-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dcce67226133bf85e7e31db79f5cf5cdcce1487fd571ce35e9d9d0e733fccb44 |
|
MD5 | ad3956fbd72ba31cf1cf86b11de05cae |
|
BLAKE2b-256 | 83373370f51194c79f15c8365485d53f687da4b7ce2b6a394f9b0af49025fa9b |
Close
Hashes for serializor-1.0.4-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e903149262c0d3a953431f61defa32b654bf5617933b11a57784d057cd40e3b2 |
|
MD5 | 74bbdc559ad95c8996b66744abfd9823 |
|
BLAKE2b-256 | 6a5d3a8ab59aba9f843c765b2aa72128bf0ef16ec6c0fbfd5fcdff5f30cd71f1 |
Close
Hashes for serializor-1.0.4-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c21edb679534af52b0c75652c167ccf500ca049eedba5768605f53d0b3fb589 |
|
MD5 | 27f0cb37a334d7c3bb0d2f2e57efb1fe |
|
BLAKE2b-256 | d9ad1e9a844eb6c6c262b5a906934b7b49f0749c02a76b4e8b70a3415a28263f |
Close
Hashes for serializor-1.0.4-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d911c8604f3a667780d84c8d777ac71ac2b2e76803dd8bd8bed15dd9e63e6e04 |
|
MD5 | 3289529d5c24cb6271d113f4439e07e3 |
|
BLAKE2b-256 | dbc1a9f0c049b7019e6c74a03e0d4017d42a850e16cb7a3da146d9c40ffe0a93 |
Close
Hashes for serializor-1.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5df3a059ca897586c698a1a5a84e5cc336ab875b10042fcc975db32814d8bc28 |
|
MD5 | 469bddde7f315459a10e7ea2c881cc4e |
|
BLAKE2b-256 | 639a6c86e49d0640832380aa78b67bda24d7cc2edcbdef4a9c536f2252d19828 |
Close
Hashes for serializor-1.0.4-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8afb484b45fbaee6995266f3c157e0d0c6f0ee8965d3b8e33efda67fa4e6425 |
|
MD5 | b9213fabafab02585d46610499f2e0e4 |
|
BLAKE2b-256 | 023981dd21025cdcbfa3e8632c6de7a297b1924c96f81372c12b6cb0ee921877 |
Close
Hashes for serializor-1.0.4-cp310-cp310-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d7871b9f5cf0f149ecd60f9ab130a95da6aa08f999140b5b1ab4c6c29624c49 |
|
MD5 | 90331807fb89b2343b8be917d306683b |
|
BLAKE2b-256 | 1615ce849b4b2ed1c44284479c443afc5f3e21eed0d19af1c08cf42fd8d40229 |