sevenbridges.meta package¶
Submodules¶
sevenbridges.meta.collection module¶
-
class
sevenbridges.meta.collection.
Collection
(resource, href, total, items, links, api)¶ Bases:
list
Wrapper for SevenBridges pageable resources. Among the actual collection items it contains information regarding the total number of entries available in on the server and resource href.
-
all
()¶ Fetches all available items. :return: Collection object.
-
next_page
()¶ Fetches next result set. :return: Collection object.
-
previous_page
()¶ Fetches previous result set. :return: Collection object.
-
resource
= None¶
-
total
¶
-
-
class
sevenbridges.meta.collection.
VolumeCollection
(href, items, links, prefixes, api)¶ Bases:
sevenbridges.meta.collection.Collection
-
next_page
()¶ Fetches next result set. :return: VolumeCollection object.
-
previous_page
()¶
-
total
¶
-
sevenbridges.meta.comp_mutable_dict module¶
sevenbridges.meta.data module¶
sevenbridges.meta.fields module¶
-
class
sevenbridges.meta.fields.
BasicListField
(name=None, read_only=False, max_length=None)¶ Bases:
sevenbridges.meta.fields.Field
-
validate
(value)¶
-
-
class
sevenbridges.meta.fields.
BooleanField
(name=None, read_only=False)¶ Bases:
sevenbridges.meta.fields.Field
-
validate
(value)¶
-
-
class
sevenbridges.meta.fields.
CompoundField
(cls, name=None, read_only=False, validator=None)¶
-
class
sevenbridges.meta.fields.
CompoundListField
(cls, name=None, read_only=True)¶
-
class
sevenbridges.meta.fields.
DateTimeField
(name=None, read_only=True)¶
-
class
sevenbridges.meta.fields.
DictField
(name=None, read_only=False)¶ Bases:
sevenbridges.meta.fields.Field
,dict
-
class
sevenbridges.meta.fields.
Field
(name=None, read_only=True, validator=None)¶ Bases:
object
-
validate
(value)¶
-
-
class
sevenbridges.meta.fields.
FloatField
(name=None, read_only=False)¶ Bases:
sevenbridges.meta.fields.Field
-
validate
(value)¶
-
-
class
sevenbridges.meta.fields.
HrefField
(name=None)¶
-
class
sevenbridges.meta.fields.
IntegerField
(name=None, read_only=False)¶ Bases:
sevenbridges.meta.fields.Field
-
validate
(value)¶
-
-
class
sevenbridges.meta.fields.
ObjectIdField
(name=None, read_only=True)¶
-
class
sevenbridges.meta.fields.
StringField
(name=None, read_only=False, max_length=None)¶ Bases:
sevenbridges.meta.fields.Field
-
validate
(value)¶
-
-
class
sevenbridges.meta.fields.
UuidField
(name=None, read_only=True)¶ Bases:
sevenbridges.meta.fields.Field
-
validate
(value)¶
-
sevenbridges.meta.resource module¶
-
class
sevenbridges.meta.resource.
Resource
(api)¶ Bases:
object
Resource is base class for all resources, hiding implementation details of magic of injecting instance of API and common operations (like generic query).
-
delete
()¶ Deletes the resource on the server.
-
classmethod
get
(id, api=None)¶ Fetches the resource from the server. :param id: Resource identifier :param api: sevenbridges Api instance. :return: Resource object.
-
reload
()¶ Refreshes the resource with the data from the server.
-
-
class
sevenbridges.meta.resource.
ResourceMeta
¶ Bases:
type
Metaclass for all resources, knows how to inject instance of API from class that contains classes with this meta. Class that contains this class has to have ‘api’ property which will be injected into class level API property of Resource class.
Creates constructors for all resources and manages instantiation of resource fields.
sevenbridges.meta.transformer module¶
-
class
sevenbridges.meta.transformer.
Transform
¶ Bases:
object
-
static
to_app
(app)¶ Serializes app to id string :param app: object to serialize :return: string id
-
static
to_billing_group
(billing_group)¶ Serializes billing_group to id string :param billing_group: object to serialize :return: string id
-
static
to_dataset
(dataset)¶
-
static
to_datestring
(d)¶ Serializes date to string :param d: object to serialize :return: string date
-
static
to_division
(division)¶ Serializes division to id string :param division: object to serialize :return: string id
-
static
to_export
(export)¶ Serializes export to id string :param export: object to serialize :return: string id
-
static
to_file
(file_)¶ Serializes file to id string :param file_: object to serialize :return: string id
-
static
to_import
(import_)¶ Serializes import to id string :param import_: object to serialize :return: string id
-
static
to_location
(location)¶ Serializes location to string :param location: object to serialize :return: string
-
static
to_marker
(marker)¶ Serializes marker to string :param marker: object to serialize :return: string id
-
static
to_member
(member)¶
-
static
to_project
(project)¶ Serializes project to id string :param project: object to serialize :return: string id
-
static
to_task
(task)¶ Serializes task to id string :param task: object to serialize :return: string id
-
static
to_team
(team)¶ Serializes team to id string :param team: object to serialize :return: string id
-
static
to_user
(user)¶ Serializes user to id string :param user: object to serialize :return: string id
-
static
to_volume
(volume)¶ Serializes volume to id string :param volume: object to serialize :return: string id
-
static