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.5.tar.gz
(2.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file simpleobject-1.0.5.tar.gz.
File metadata
- Download URL: simpleobject-1.0.5.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06c47970abf4ad16ff87c67d5a7b06b443c5418535cc16f2dc463b200a8f4ec2
|
|
| MD5 |
243a6a0f5cf9b330a020c9efbbaee7d5
|
|
| BLAKE2b-256 |
2ebb5a04a88072b9aec58eeae14087f05f90d4cd72ecb0d24e86b891583dc8e8
|
File details
Details for the file simpleobject-1.0.5-py3-none-any.whl.
File metadata
- Download URL: simpleobject-1.0.5-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d64def37471d758ab68dfc4c481bd2ac1b0d48025379eeb8ec8b760e3044d305
|
|
| MD5 |
9449108fc06db93eb86a550bd332514b
|
|
| BLAKE2b-256 |
77eb6dbdf2291180303a76c1421b502c0c65c1a24eb5060b2e67cdee714f2060
|