jams.Sandbox

class jams.Sandbox(unconstrained)[source]

Bases: jams.core.JObject

Functionally identical to JObjects, but the class hierarchy might be confusing if all objects inherit from Sandboxes.

__init__(**kwargs)

Construct a new JObject

Parameters:
kwargs

Each keyword argument becomes an attribute with the specified value

Examples

>>> J = jams.JObject(foo=5)
>>> J.foo
5
>>> dict(J)
{'foo': 5}

Attributes

type The type (class name) of a derived JObject type

Methods

__init__(**kwargs) Construct a new JObject
dumps(**kwargs) Serialize the JObject to a string.
keys() Return a list of the attributes of the object.
loads(string) De-serialize a JObject
search(**kwargs) Query this object (and its descendants).
update(**kwargs) Update the attributes of a JObject.
validate([strict]) Validate a JObject against its schema