Skip to main content

Simple serializer

Project description

emw-serializer

  • Basic serializer.
  • Converts (nested) structures to dict or JSON string.
  • Useful for API work.

Usage

from emw_serializer import JsonSerializer


class Gakk:
    def __init__(self):
        self.a = 'a'
        self.b = 5


serializer = JsonSerializer()
thing_to_serialize = Gakk()
json = serializer.serialize(thing_to_serialize)
print(json)

will print

{
    "a": "a",
    "b": 5
}

Capabilities

Caters for:

  • str, int, float, bool
  • dict, list, set
  • Enum
  • class properties
  • object properties
  • @property decorators
  • property() function

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

emw_serializer-0.0.2.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

emw_serializer-0.0.2-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

Details for the file emw_serializer-0.0.2.tar.gz.

File metadata

  • Download URL: emw_serializer-0.0.2.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.6

File hashes

Hashes for emw_serializer-0.0.2.tar.gz
Algorithm Hash digest
SHA256 95f5ad8deceb9f4b43520df3c11aa638ad2e29e06f6dfd303b139b1af06a7be6
MD5 6b76aee29ae347166977e2795e978d3e
BLAKE2b-256 f14d0d646d26e89fc684a94ee4b1311c4e9588e30971313774ad5581786026a3

See more details on using hashes here.

File details

Details for the file emw_serializer-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: emw_serializer-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 2.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.6

File hashes

Hashes for emw_serializer-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 586629a9a34b3cb320bfc98cfcca02bf0ba47f406468d4c2ab338665b3cf2161
MD5 84d575cdc036169cd081fe999582b247
BLAKE2b-256 23ec815a073f6d407f459d61bd5f476ceba426bbbe8e425887f3ddf813f46ddf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page