Skip to main content

Jsobject is simple implementation JavaScript-Style Objects in Python.

Project description

Latest Version Downloads Supported Python versions License Development Status

jsobject: Objects for Humans

jsobject is simple implementation JavaScript-Style Objects in Python. It is distributed as a single file module and has no dependencies other than the Python Standard Library.

Homepage and documentation: https://mavier.github.io/jsobject

Example: “Hello World” with jsobject

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

Download and Install

Install the latest stable release with pip install jsobject, easy_install -U jsobject or download jsobject.py (unstable) into your project directory. There are no hard dependencies other than the Python standard library. Jsobject runs with Python 2.6+ and 3.x.

Testing

To run the tests use the nosetest.

https://travis-ci.org/mavier/jsobject.png?branch=master https://coveralls.io/repos/mavier/jsobject/badge.png

License

Code and documentation are available according to the MIT License.

Tips

Tips

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

jsobject-0.9.19.tar.gz (4.1 kB view details)

Uploaded Source

File details

Details for the file jsobject-0.9.19.tar.gz.

File metadata

  • Download URL: jsobject-0.9.19.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for jsobject-0.9.19.tar.gz
Algorithm Hash digest
SHA256 f74a2d8f190e18973a49655e18fe06f73b284f95755db6e2e6ad58a5484c79cb
MD5 8f4dee05d64661f4d0aa567e78a6fccc
BLAKE2b-256 de060c367ec688148ce9d2a442c0185b3c7c1a199b11dadaef9696cfd7d4bf18

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