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
  • 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.1.tar.gz (1.7 kB view hashes)

Uploaded Source

Built Distribution

emw_serializer-0.0.1-py3-none-any.whl (1.7 kB view hashes)

Uploaded Python 3

Supported by

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