wallaroo.object
Represents a not-set sentinel value.
Attributes that are null in the database will be returned as None in Python, and we want them to be set as such, so None cannot be used as a sentinel value signaling that an optional attribute is not yet set. Objects of this class fill that role instead.
Decorator that rehydrates the named attribute if needed.
This should decorate getter calls for an attribute:
@rehydrate(_foo_attr)
def foo_attr(self):
return self._foo_attr
This will cause the API object to "rehydrate" (perform a query to fetch and fill in all attributes from the database) if the named attribute is not set.
Returns a value in a nested dictionary, or DehydratedValue.
Parameters
- str path: Dot-delimited path within a nested dictionary; e.g.
foo.bar.baz
Returns
The requested value inside the dictionary, or DehydratedValue if it doesn't exist.
Raised when an API object is initialized without a required attribute.
Inherited Members
- builtins.BaseException
- with_traceback
- args
Raised when a model file fails to upload.
Inherited Members
- builtins.BaseException
- with_traceback
- args
Raised when a model file fails to convert.
Inherited Members
- builtins.BaseException
- with_traceback
- args
Raised when a model conversion took longer than 10mins
Inherited Members
- builtins.BaseException
- with_traceback
- args
Raised when a query for a specific API object returns no results.
This is specifically for queries by unique identifiers that are expected to return exactly one result; queries that can return 0 to many results should return empty list instead of raising this exception.
Inherited Members
- builtins.BaseException
- with_traceback
- args
Raised when deployment fails.
Inherited Members
- builtins.BaseException
- with_traceback
- args
Raised when a community instance has hit the user limit
Inherited Members
- builtins.BaseException
- with_traceback
- args
Raised when deployment fails.
Inherited Members
- builtins.BaseException
- with_traceback
- args
Raised when inference fails.
Inherited Members
- builtins.BaseException
- with_traceback
- args
Raised when an entity's name does not meet the expected critieria.
Parameters
- str name: the name string that is invalid
- str req: a string description of the requirement
Inherited Members
- builtins.BaseException
- with_traceback
- args
Raised when some component cannot be contacted. There is a networking, configuration or installation problem.
Inherited Members
- builtins.BaseException
- with_traceback
- args
Base class for all backend GraphQL API objects.
This class serves as a framework for API objects to be constructed based on a partially-complete JSON response, and to fill in their remaining members dynamically if needed.
Base constructor.
Each object requires:
- a GraphQL client - in order to fill its missing members dynamically
- an initial data blob - typically from unserialized JSON, contains at
- least the data for required members (typically the object's primary key) and optionally other data members.