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.3.tar.gz
(464.9 kB
view hashes)
Built Distributions
Close
Hashes for serializor-1.0.3-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5eebd0c5fb40e462e2781f81e5aaeda63ef7b021503c3fedfdf6d1d44a0282a |
|
MD5 | 6017d69f39561b96acac20dfeb4479c1 |
|
BLAKE2b-256 | 087167b2a3bf08362ba316387c52bb8e4106871153bff5c771400bc45724b27f |
Close
Hashes for serializor-1.0.3-cp312-cp312-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 456182cbbccb45d5306e9dc8fad7dfb9272f434c0ae840837b0ca57c51027974 |
|
MD5 | dbda00d07bee992f10fa5602fa4a285c |
|
BLAKE2b-256 | e8e9ad24f1c0ee216de1ee08396a1c27919fd4aefc1b4abd000d03a07f1126e1 |
Close
Hashes for serializor-1.0.3-cp312-cp312-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7db4dc5beaa50a71dbd4feef164ebaf4abdb4ae3aae0161a7f14dc271fc2f0d8 |
|
MD5 | ade741424b80f8b14f8bf59e3c343f9c |
|
BLAKE2b-256 | 420bcf963ab00d01b231977c5f3599c72522235a7bc8e1e44848d0e46a12b846 |
Close
Hashes for serializor-1.0.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51255396555094dbfcc0b89b2f73136d678a8809119e87172d82744aa9c8333f |
|
MD5 | 35537a161c9ba704c9182b5d0617b792 |
|
BLAKE2b-256 | f5ca42f67da81614cfda346756051639c780acf48082b42e22558b2a197ef720 |
Close
Hashes for serializor-1.0.3-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 341fc85d3b8fb301e87ba944d956dbe6ba75fcf9b242ee427f56dc011cdf48bb |
|
MD5 | c00032e75e5932e7831e96c40cb04287 |
|
BLAKE2b-256 | 4a377200fed5c383e6ae86813d91ef80e99bd5f25dfd48469cd2a535731ad8e4 |
Close
Hashes for serializor-1.0.3-cp312-cp312-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1fba9659650bf581d7eb03205d758c2d3b609c2d0bfbcd502ec7ccd31fe1a6f |
|
MD5 | a68429ce45c9d6ed64d3c0b38005d6b2 |
|
BLAKE2b-256 | c07a675c0f5e5205c581c0ccd7efbd11b0f891f6e744891b45ac0cea45e90a6d |
Close
Hashes for serializor-1.0.3-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd1bb696509aec49f66473e060fd45a3d9893ef765da281711b1c7bf76bf2338 |
|
MD5 | 36b54a68afe3d933e4dfbaaa075ae5b3 |
|
BLAKE2b-256 | 8de195a6068aab92c2c93a16c7dd0dea2b931b31dcd9f0a127d9aa7f6a30ab78 |
Close
Hashes for serializor-1.0.3-cp311-cp311-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f367aecb7867cb94662ea5ed1556371d45f05727b3cc103b24631149645bb34 |
|
MD5 | bf6bf0271ac51c823089d5dafbdd6847 |
|
BLAKE2b-256 | 0cedbf68c984b85c16e24efa47ae0e5794ffbf1668e7af5a9672c0cb43683200 |
Close
Hashes for serializor-1.0.3-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f922f01467adf9e094784e0eea580aff2898922f9fbb4fee8e904619a8eb8e39 |
|
MD5 | 4f655134b08d8220f00ae6ea30c752e8 |
|
BLAKE2b-256 | 1c154f8b3158d15f388b394d0ce8142dfcff19066e788856b4fd56abc1702125 |
Close
Hashes for serializor-1.0.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 407c990e400e5809fa7ba8abad80275b128dcb703e8e6adef83533ab95483e5f |
|
MD5 | 3489c4781f6ac91b61ba5b791cdbbcf6 |
|
BLAKE2b-256 | c507dacf1fd8d1eca566754933b3395fe68b84996ba6bf881920ead7dcd0c9a0 |
Close
Hashes for serializor-1.0.3-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d430cbcf8829414b9aa8d468be14fd2990c39cdda65c07ae2699736868c83e01 |
|
MD5 | dce5ee755f75cf2bc8e3d2defde98246 |
|
BLAKE2b-256 | 35261b1db79820471cad497942b34c199a048396ea192070362f580d58e81d40 |
Close
Hashes for serializor-1.0.3-cp311-cp311-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 267f7e0e9a1a6bb9639b60a6b7a2e394eed41fb1c2913e92988bf7d64096dc25 |
|
MD5 | 653a6fadf7dc00705c088afc4eef2718 |
|
BLAKE2b-256 | 6f24acea409a725086b7a18adacec6b2d04ab26da1d27181042cc2e6541675cd |
Close
Hashes for serializor-1.0.3-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c51a1a21865b045155c13838bc83f1682dcd8740f1135901a119972bc0c8d84a |
|
MD5 | c53b1e38a909d91391329195022886f9 |
|
BLAKE2b-256 | becf34a56d826b8033eb92a2c4ab8f20783846ca0aeda40aa99403c865b7fd36 |
Close
Hashes for serializor-1.0.3-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 026e06a1f130ac753d9e5e02a9ae0608143b19bfa21f67736a648004180f1f50 |
|
MD5 | fbb12801ce006210c94aba2f19899571 |
|
BLAKE2b-256 | be37215bcd1eb0d48ae947f989e0893dd16f17c8f2e0a747a1b2543f5a4a4ea3 |
Close
Hashes for serializor-1.0.3-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff7e8e29ae116d7877b2b04ab207617024e7a4fad6cd6dd01d35cb7451d0ee53 |
|
MD5 | 46e483afc27639d9d3309bbc07c75072 |
|
BLAKE2b-256 | 034bfd62cba196d9e271088da00cf989cb6b1b5c6f8e68162a489777e75cd87d |
Close
Hashes for serializor-1.0.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fbf49d6efa542dd5792288cd6f59c6b4fba78ca1cd6b2530790fa2d4af3192d7 |
|
MD5 | fa398fe4e0906ce9de57a6254f07c1f0 |
|
BLAKE2b-256 | 72c81853b26bf023cb9386c1e30944f4c336f8ecaa85ac1effc4da3cd4c24175 |
Close
Hashes for serializor-1.0.3-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12f909e87f4567c7814d42668b14ee4d61ba616e3d4b995bc528784b337cb6ab |
|
MD5 | 9f68c39192e820fcfa33160ebd249d04 |
|
BLAKE2b-256 | 5d439345b1fd8a1d185e481e07141948fd1f649e0f7aac8870b290448447243e |
Close
Hashes for serializor-1.0.3-cp310-cp310-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4acb48d26e12b60d96edb62421266dec6daf8dafbfa68855be86e3df1634dc12 |
|
MD5 | d22625b9489e948a31bdb85b5cb5a255 |
|
BLAKE2b-256 | e42049f67e1c340321d172af4c73c659a432b50a280bd56a6c82d42cba206eb3 |