sevenbridges.meta package¶
Submodules¶
sevenbridges.meta.collection module¶
- class sevenbridges.meta.collection.Collection(resource, href, total, items, links, api)[source]¶
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.
- resource = None¶
- property total¶
sevenbridges.meta.comp_mutable_dict module¶
sevenbridges.meta.data module¶
sevenbridges.meta.fields module¶
- class sevenbridges.meta.fields.BasicListField(read_only, name=None, max_length=None)[source]¶
Bases:
Field
- class sevenbridges.meta.fields.CompoundField(cls, read_only, name=None, validator=None)[source]¶
Bases:
Field
- class sevenbridges.meta.fields.Field(name=None, read_only=True, validator=None)[source]¶
Bases:
object
- EMPTY = <object object>¶
sevenbridges.meta.resource module¶
- class sevenbridges.meta.resource.Resource(api, *args, **kwargs)[source]¶
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).
- field(name)[source]¶
Return field value if it’s set :param name: Field name :return: Field value or None
- class sevenbridges.meta.resource.ResourceMeta(name, bases, dct)[source]¶
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[source]¶
Bases:
object
- static to_app(app)[source]¶
Serializes app to id string :param app: object to serialize :return: string id
- static to_billing_group(billing_group)[source]¶
Serializes billing_group to id string :param billing_group: object to serialize :return: string id
- static to_datestring(d)[source]¶
Serializes date to string :param d: object to serialize :return: string date
- static to_division(division)[source]¶
Serializes division to id string :param division: object to serialize :return: string id
- static to_export(export)[source]¶
Serializes export to id string :param export: object to serialize :return: string id
- static to_file(file_)[source]¶
Serializes file to id string :param file_: object to serialize :return: string id
- static to_import(import_)[source]¶
Serializes import to id string :param import_: object to serialize :return: string id
- static to_location(location)[source]¶
Serializes location to string :param location: object to serialize :return: string
- static to_marker(marker)[source]¶
Serializes marker to string :param marker: object to serialize :return: string id
- static to_project(project)[source]¶
Serializes project to id string :param project: object to serialize :return: string id
- static to_task(task)[source]¶
Serializes task to id string :param task: object to serialize :return: string id
- static to_team(team)[source]¶
Serializes team to id string :param team: object to serialize :return: string id