magpie.api.schemas¶
Attributes¶
Classes¶
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
|
Fundamental building block of schemas. |
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
|
Fundamental building block of schemas. |
Fundamental building block of schemas. |
|
|
Fundamental building block of schemas. |
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
|
Fundamental building block of schemas. |
Functions¶
|
|
|
|
|
Return JSON Swagger specifications of Magpie REST API. |
Module Contents¶
- magpie.api.schemas.service_api_route_info(service_api: cornice.Service, **kwargs: Any) Dict[magpie.typedefs.Str, Any] [source]¶
- class magpie.api.schemas.ServiceType_RequestPathSchema(*arg, **kw)[source]¶
Bases:
colander.MappingSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.Service_RequestPathSchema(*arg, **kw)[source]¶
Bases:
colander.MappingSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.Resource_RequestPathSchema(*arg, **kw)[source]¶
Bases:
colander.MappingSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.ServiceResource_RequestPathSchema(*arg, **kw)[source]¶
Bases:
colander.MappingSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.Permission_RequestPathSchema(*arg, **kw)[source]¶
Bases:
colander.MappingSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.Group_RequestPathSchema(*arg, **kw)[source]¶
Bases:
colander.MappingSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.User_RequestPathSchema(*arg, **kw)[source]¶
Bases:
colander.MappingSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.UserGroup_RequestPathSchema(*arg, **kw)[source]¶
Bases:
colander.MappingSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.GroupService_RequestPathSchema(*arg, **kw)[source]¶
Bases:
colander.MappingSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.GroupServicePermission_RequestPathSchema(*arg, **kw)[source]¶
Bases:
colander.MappingSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.GroupResource_RequestPathSchema(*arg, **kw)[source]¶
Bases:
colander.MappingSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.GroupResourcePermission_RequestPathSchema(*arg, **kw)[source]¶
Bases:
colander.MappingSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.UserService_RequestPathSchema(*arg, **kw)[source]¶
Bases:
colander.MappingSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.UserServicePermission_RequestPathSchema(*arg, **kw)[source]¶
Bases:
colander.MappingSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.UserResource_RequestPathSchema(*arg, **kw)[source]¶
Bases:
colander.MappingSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.UserResourcePermission_RequestPathSchema(*arg, **kw)[source]¶
Bases:
colander.MappingSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.Provider_RequestPathSchema(*arg, **kw)[source]¶
Bases:
colander.MappingSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.TemporaryURL_RequestPathSchema(*arg, **kw)[source]¶
Bases:
colander.MappingSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.AcceptType(*arg, **kw)[source]¶
Bases:
colander.SchemaNode
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.ContentType(*arg, **kw)[source]¶
Bases:
colander.SchemaNode
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.RequestHeaderSchemaAPI(*arg, **kw)[source]¶
Bases:
colander.MappingSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.RequestHeaderSchemaUI(*arg, **kw)[source]¶
Bases:
colander.MappingSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.QueryRequestSchemaAPI(*arg, **kw)[source]¶
Bases:
colander.MappingSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.QueryEffectivePermissions(*arg, **kw)[source]¶
Bases:
colander.MappingSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.QueryInheritGroupsPermissions(*arg, **kw)[source]¶
Bases:
colander.MappingSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.QueryResolvedUserGroupsPermissions(*arg, **kw)[source]¶
Bases:
colander.MappingSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.QueryFilterResources(*arg, **kw)[source]¶
Bases:
colander.MappingSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.QueryParentResources(*arg, **kw)[source]¶
Bases:
colander.MappingSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- flatten[source]¶
Create and return a data structure which is a flattened representation of the passed in struct based on the schema represented by this node. The return data structure is a dictionary; its keys are dotted names. Each dotted name represents a path to a location in the schema. The values of of the flattened dictionary are subvalues of the passed in struct.
- class magpie.api.schemas.QueryCascadeResourcesPermissions(*arg, **kw)[source]¶
Bases:
colander.MappingSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.QueryFlattenServices(*arg, **kw)[source]¶
Bases:
colander.MappingSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- flatten[source]¶
Create and return a data structure which is a flattened representation of the passed in struct based on the schema represented by this node. The return data structure is a dictionary; its keys are dotted names. Each dotted name represents a path to a location in the schema. The values of of the flattened dictionary are subvalues of the passed in struct.
- class magpie.api.schemas.QueryFilterServiceType(*arg, **kw)[source]¶
Bases:
colander.MappingSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.PhoenixServicePushOption(*arg, **kw)[source]¶
Bases:
colander.SchemaNode
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.BaseRequestSchemaAPI(*arg, **kw)[source]¶
Bases:
colander.MappingSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.HeaderResponseSchema(*arg, **kw)[source]¶
Bases:
colander.MappingSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.BaseResponseSchemaAPI(*arg, **kw)[source]¶
Bases:
colander.MappingSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.BaseResponseBodySchema(code, description, **kw)[source]¶
Bases:
colander.MappingSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.ErrorVerifyParamConditions(*arg, **kw)[source]¶
Bases:
colander.MappingSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.ErrorVerifyParamBodySchema(*arg, **kw)[source]¶
Bases:
colander.MappingSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.ErrorFallbackBodySchema(*arg, **kw)[source]¶
Bases:
colander.MappingSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.ErrorCallBodySchema(*arg, **kw)[source]¶
Bases:
ErrorFallbackBodySchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.ErrorResponseBodySchema(code: int, description: str, **kw: Any)[source]¶
Bases:
BaseResponseBodySchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.InternalServerErrorResponseBodySchema(**kw: Any)[source]¶
Bases:
ErrorResponseBodySchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.BadRequestResponseSchema(*arg, **kw)[source]¶
Bases:
BaseResponseSchemaAPI
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.UnauthorizedResponseBodySchema(**kw: Any)[source]¶
Bases:
ErrorResponseBodySchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.UnauthorizedResponseSchema(*arg, **kw)[source]¶
Bases:
BaseResponseSchemaAPI
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.HTTPForbiddenResponseSchema(*arg, **kw)[source]¶
Bases:
BaseResponseSchemaAPI
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.NotFoundResponseSchema(*arg, **kw)[source]¶
Bases:
BaseResponseSchemaAPI
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.MethodNotAllowedResponseSchema(*arg, **kw)[source]¶
Bases:
BaseResponseSchemaAPI
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.NotAcceptableResponseSchema(*arg, **kw)[source]¶
Bases:
BaseResponseSchemaAPI
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.UnprocessableEntityResponseSchema(*arg, **kw)[source]¶
Bases:
BaseResponseSchemaAPI
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.InternalServerErrorResponseSchema(*arg, **kw)[source]¶
Bases:
BaseResponseSchemaAPI
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.ProvidersListSchema(*args, **kw)[source]¶
Bases:
colander.SequenceSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.ResourceTypesListSchema(*args, **kw)[source]¶
Bases:
colander.SequenceSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.ChildrenResourceTypesListSchema(*args, **kw)[source]¶
Bases:
colander.SequenceSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.GroupNamesListSchema(*args, **kw)[source]¶
Bases:
colander.SequenceSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.UserNamesListSchema(*args, **kw)[source]¶
Bases:
colander.SequenceSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.Permission_Check_BadRequestResponseSchema(*arg, **kw)[source]¶
Bases:
BaseResponseSchemaAPI
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.PermissionObjectSchema(*arg, **kw)[source]¶
Bases:
colander.MappingSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.PermissionObjectTypeSchema(*arg, **kw)[source]¶
Bases:
PermissionObjectSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.PermissionObjectListSchema(*args, **kw)[source]¶
Bases:
colander.SequenceSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.PermissionNameListSchema(*args, **kw)[source]¶
Bases:
colander.SequenceSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.PermissionPatchObjectSchema(*arg, **kw)[source]¶
Bases:
colander.MappingSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.PermissionPatchListSchema(*args, **kw)[source]¶
Bases:
colander.SequenceSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.Permissions_PATCH_RequestBodySchema(*arg, **kw)[source]¶
Bases:
colander.MappingSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.Permissions_PATCH_RequestSchema(*arg, **kw)[source]¶
Bases:
BaseRequestSchemaAPI
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.Permissions_PATCH_OkResponseSchema(*arg, **kw)[source]¶
Bases:
BaseResponseSchemaAPI
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.Permissions_PATCH_BadRequestResponseSchema(*arg, **kw)[source]¶
Bases:
BaseResponseSchemaAPI
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.Permissions_PATCH_ForbiddenResponseSchema(*arg, **kw)[source]¶
Bases:
BaseResponseSchemaAPI
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.BaseUserInfoSchema(*arg, **kw)[source]¶
Bases:
colander.MappingSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.PendingUserInfoSchema(*arg, **kw)[source]¶
Bases:
BaseUserInfoSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.RegisteredUserInfoSchema(*arg, **kw)[source]¶
Bases:
BaseUserInfoSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.UserBodySchema(*arg, **kw)[source]¶
Bases:
RegisteredUserInfoSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.UserDetailListSchema(*args, **kw)[source]¶
Bases:
colander.SequenceSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.GroupBaseBodySchema(*arg, **kw)[source]¶
Bases:
colander.MappingSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.GroupPublicBodySchema(*arg, **kw)[source]¶
Bases:
GroupBaseBodySchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.GroupInfoBodySchema(*arg, **kw)[source]¶
Bases:
GroupBaseBodySchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.GroupDetailBodySchema(*arg, **kw)[source]¶
Bases:
GroupPublicBodySchema
,GroupInfoBodySchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.ServiceConfigurationSchema(*arg, **kw)[source]¶
Bases:
colander.MappingSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty strings and the first letter of every resulting word capitalized). The title is used by higher-level systems (not by Colander itself).description
: The description for this node. Defaults to''
(the empty string). The description is used by higher-level systems (not by Colander itself).widget
: The ‘widget’ for this node. Defaults toNone
. The widget attribute is not interpreted by Colander itself, it is only meaningful to higher-level systems such as Deform.insert_before
: if supplied, it names a sibling defined by a superclass for its parent node; the current node will be inserted before the named node. It is not useful unless a mapping schema is inherited from another mapping schema, and you need to control the ordering of the resulting nodes.
Arbitrary keyword arguments remaining will be attached to the node object unmolested.
- class magpie.api.schemas.ServiceSummarySchema(*arg, **kw)[source]¶
Bases:
colander.MappingSchema
Fundamental building block of schemas.
The constructor accepts these positional arguments:
typ
: The ‘type’ for this node. It should be an instance of a class that implements thecolander.interfaces.Type
interface. Iftyp
is not passed, a call to theschema_type()
method on this class is made to get a default type. (When subclassing,schema_type()
should be overridden to provide a reasonable default type).*children
: a sequence of subnodes. If the subnodes of this node are not known at construction time, they can later be added via theadd
method.
The constructor accepts these keyword arguments:
name
: The name of this node.typ
: The ‘type’ for this node can optionally be passed in as a keyword argument. See the documentation for the positional arg above.default
: The default serialization value for this node when not set. Ifdefault
iscolander.drop
, the node will be dropped from schema serialization. If not provided, the node will be serialized tocolander.null
.missing
: The default deserialization value for this node. If it is not provided, the missing value of this node will be the special marker valuecolander.required
, indicating that it is considered ‘required’. Whenmissing
iscolander.required
, therequired
computed attribute will beTrue
. Whenmissing
iscolander.drop
, the node is dropped from the schema if it isn’t set during deserialization.missing_msg
: Optional error message to be used if the value is required and missing.preparer
: Optional preparer for this node. It should be an object that implements thecolander.interfaces.Preparer
interface.validator
: Optional validator for this node. It should be an object that implements thecolander.interfaces.Validator
interface.after_bind
: A callback which is called after a clone of this node has ‘bound’ all of its values successfully. This callback is useful for performing arbitrary actions to the cloned node, or direct children of the cloned node (such as removing or adding children) at bind time. A ‘binding’ is the result of an execution of thebind
method of the clone’s prototype node, or one of the parents of the clone’s prototype nodes. The deepest nodes in the node tree are bound first, so theafter_bind
methods of the deepest nodes are called before the shallowest. Theafter_bind
callback should accept two values:node
andkw
.node
will be a clone of the bound node object,kw
will be the set of keywords passed to thebind
method.title
: The title of this node. Defaults to a titleization of thename
(underscores replaced with empty st