Skip to main content

Simple json serializable object

Project description

simpleobject

Simple json serializable object

Can be used as a types.SimpleNamespace, but it is json serializable like a python dictionary.

Install

python -m pip install simpleobject

Usage

from simpleobject import simpleobject
from json import dumps

o = simpleobject()
o.foo = 1
o.bar = 2
print(o) #simpleobject(foo=1, bar=2)
print(dumps(o)) #{"foo": 1, "bar": 2}

You can also set the name

o.name = 'FooBarObject'
print(o) #FooBarObject(foo=1, bar=2)

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

simpleobject-1.0.3.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

simpleobject-1.0.3-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

Details for the file simpleobject-1.0.3.tar.gz.

File metadata

  • Download URL: simpleobject-1.0.3.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for simpleobject-1.0.3.tar.gz
Algorithm Hash digest
SHA256 00f254b9633188dc493f456e7b723747bad26ecfd169c823d82b948d9f1b7d41
MD5 3fe0578dd73540fce6bde822ab9f7137
BLAKE2b-256 c481ed68f3abf30346e1f83be31f6934db2d76c1e2a332f681a8ad93fc3896f5

See more details on using hashes here.

File details

Details for the file simpleobject-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: simpleobject-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 2.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for simpleobject-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 305b88764f62f6881493f95431f30f519f0a671eabbb38acc8b37aae8b7560f1
MD5 e02ac7868bf9153c1b86e54aaab517b1
BLAKE2b-256 682c48419da80fe0ac4b1b065b6a5602a95affce37dec13d37c9f77b72403675

See more details on using hashes here.

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