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__(self, **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__(self, \*\*kwargs) Construct a new JObject
dumps(self, \*\*kwargs) Serialize the JObject to a string.
keys(self) Return a list of the attributes of the object.
loads(string) De-serialize a JObject
search(self, \*\*kwargs) Query this object (and its descendants).
update(self, \*\*kwargs) Update the attributes of a JObject.
validate(self[, strict]) Validate a JObject against its schema