Skip to main content

jsobj provides JavaScript-Style Objects in Python. It is based on jsobject, but returns None if you try accessing non-existent keys instead of throwing an exception.

Homepage and documentation: https://github.com/gkovacs/jsobj

Example: “Hello World” with jsobj

from jsobject import Object
data = {
  "boolean": True,
  "null": None,
  "number": 123,
  "objectA": {'a': 'b', 'c': {'d': 'e', 'f': {'g': 'h'}}}
  }

jso = Object(data)

print(jso.boolean)       # True
print(jso.null)          # None
print(jso.number)        # 123
print(jso.objectA)       # {'a': 'b', 'c': {'d': 'e', 'f': {'g': 'h'}}}
print(jso.objectA.a)     # b
print(jso.objectA.c.d)   # e
print(jso.objectA.c.f.g) # h

Installation

$ pip install jsobj

License

MIT

Credits

Geza Kovacs. Based on jsobject by Marcin Wierzbanowski

Release files for jsobj 1.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jsobj 1.0.4
File Size Uploaded
jsobj-1.0.4.tar.gz 3.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for jsobj 1.0.4
File Interpreter ABI Platform
jsobj-1.0.4-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 8.2 kB

Release files / jsobj-1.0.4.tar.gz

Download URL jsobj-1.0.4.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
7b2bf229a247ded5b8c6a2778b6615fc0729b3cbfb8756c6f4e9a25d8a045cf6
BLAKE2b-256 checksum
How to use checksums
eec83475e57bf3935493b7e58842c33cce8dea5c987eab675075dda92ec27cb0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / jsobj-1.0.4-py2.py3-none-any.whl

Download URL jsobj-1.0.4-py2.py3-none-any.whl
Size 4.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
d0c76386669bbd09191e384f0c92f629ce73a3174b0d12219680b68d55f2d090
BLAKE2b-256 checksum
How to use checksums
fc5881868e0bf60141812a7e22735eeb0493ab49af35758e45114fa6f32ed4ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.0.4 This release

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page