sevenbridges.models package

Subpackages

Submodules

sevenbridges.models.actions module

class sevenbridges.models.actions.Actions(**kwargs)[source]

Bases: Resource

classmethod bulk_copy_files(files, destination_project, api=None)[source]

Bulk copy of files. :param files: List containing files to be copied. :param destination_project: Destination project. :param api: Api instance. :return: MultiStatus copy result.

deepcopy()
equals(other)
classmethod send_feedback(type='IDEA', referrer=None, text=None, api=None)[source]

Sends feedback to sevenbridges. :param type: FeedbackType wither IDEA, PROBLEM or THOUGHT. :param text: Feedback text. :param referrer: Feedback referrer. :param api: Api instance.

sevenbridges.models.app module

class sevenbridges.models.app.App(**kwargs)[source]

Bases: Resource

Central resource for managing apps.

copy(project, name=None, strategy=None, use_revision=False, api=None)[source]

Copies the current app. :param project: Destination project. :param name: Destination app name. :param strategy: App copy strategy. :param use_revision: Copy from set app revision. :param api: Api instance. :return: Copied App object.

Copy strategies:

clone copy all revisions and continue getting updates form the

original app (default method when the key is omitted)

direct copy only the latest revision and get the updates from

this point on

clone_direct copy the app like the direct strategy, but keep all

revisions

transient copy only the latest revision and continue getting

updates from the original app

classmethod create_revision(id, revision, raw, api=None)[source]

Create a new app revision. :param id: App identifier. :param revision: App revision. :param raw: Raw cwl object. :param api: Api instance. :return: App object.

deepcopy()
equals(other)
classmethod get_revision(id, revision, api=None)[source]

Get app revision. :param id: App identifier. :param revision: App revision :param api: Api instance. :return: App object.

href = None
property id
classmethod install_app(id, raw, api=None, raw_format=None)[source]

Installs and app. :param id: App identifier. :param raw: Raw cwl data. :param api: Api instance. :param raw_format: Format of raw app data being sent, json by default :return: App object.

name = None
project = None
classmethod query(project=None, visibility=None, q=None, id=None, offset=None, limit=None, api=None)[source]

Query (List) apps. :param project: Source project. :param visibility: private|public for private or public apps. :param q: List containing search terms. :param id: List contains app ids. Fetch apps with specific ids. :param offset: Pagination offset. :param limit: Pagination limit. :param api: Api instance. :return: collection object

raw = None
revision = None
sync()[source]

Syncs the parent app changes with the current app instance. :return: Synced App object.

sevenbridges.models.billing_egress_breakdown module

class sevenbridges.models.billing_egress_breakdown.BillingGroupEgressBreakdown(**kwargs)[source]

Bases: Resource

deepcopy()
downloaded
downloaded_by = None
egress_cost
equals(other)
project_locked = None
project_name = None
classmethod query(bg_id, api=None, date_from=None, date_to=None, invoice_id=None, fields=None, offset=None, limit=None)[source]

Query (List) billing group egress breakdown. Date parameters must be string in format MM-DD-YYYY

Parameters:
  • fields

  • invoice_id

  • date_to – include all egress transactions charged before and including date_to

  • date_from – include all egress transactions charged after and including date_from

  • bg_id – Billing Group ID

  • offset – Pagination offset.

  • limit – Pagination limit.

  • api – Api instance.

Returns:

Collection object.

sevenbridges.models.billing_storage_breakdown module

class sevenbridges.models.billing_storage_breakdown.BillingGroupStorageBreakdown(**kwargs)[source]

Bases: Resource

active
archived
deepcopy()
equals(other)
location = None
project_created_by = None
project_locked = None
project_name = None
classmethod query(bg_id, api=None, date_from=None, date_to=None, invoice_id=None, fields=None, offset=None, limit=None)[source]

Query (List) billing group storage breakdown. Date parameters must be string in format MM-DD-YYYY

Parameters:
  • fields

  • invoice_id

  • date_to – include all storage transactions charged before and including date_to

  • date_from – include all storage transactions charged after and including date_from

  • bg_id – Billing Group ID

  • offset – Pagination offset.

  • limit – Pagination limit.

  • api – Api instance.

Returns:

Collection object.

sevenbridges.models.billing_group module

class sevenbridges.models.billing_group.BillingGroup(**kwargs)[source]

Bases: Resource

Central resource for managing billing groups.

analysis_breakdown(date_from=None, date_to=None, invoice_id=None, fields=None, offset=None, limit=None)[source]

Get Billing group analysis breakdown for the current billing group.

balance
deepcopy()
disabled = None
egress_breakdown(date_from=None, date_to=None, invoice_id=None, fields=None, offset=None, limit=None)[source]

Get Billing group egress breakdown for the current billing group.

equals(other)
href = None
id = None
name = None
owner = None
pending = None
classmethod query(offset=None, limit=None, api=None)[source]

Query (List) billing group. :param offset: Pagination offset. :param limit: Pagination limit. :return: Collection object. :param api: Api instance.

storage_breakdown(date_from=None, date_to=None, invoice_id=None, fields=None, offset=None, limit=None)[source]

Get Billing group storage breakdown for the current billing group.

type = None

sevenbridges.models.division module

class sevenbridges.models.division.Division(**kwargs)[source]

Bases: Resource

Central resource for managing divisions.

deepcopy()
equals(other)
get_members(role=None, offset=None, limit=None)[source]
get_teams(offset=None, limit=None)[source]
href = None
id = None
name = None
classmethod query(offset=None, limit=None, api=None)[source]

Query (List) divisions.

Parameters:
  • offset – Pagination offset.

  • limit – Pagination limit.

  • api – Api instance.

Returns:

Collection object.

sevenbridges.models.endpoints module

class sevenbridges.models.endpoints.Endpoints(**kwargs)[source]

Bases: Resource

Central resource for managing Endpoints.

action_url = None
apps_url = None
billing_url = None
deepcopy()
equals(other)
files_url = None
classmethod get(api=None, **kwargs)[source]

Get api links. :param api: Api instance. :return: Endpoints object.

projects_url = None
rate_limit_url = None
tasks_url = None
upload_url = None
user_url = None
users_url = None

sevenbridges.models.enums module

class sevenbridges.models.enums.AppCopyStrategy[source]

Bases: object

CLONE = 'clone'
CLONE_DIRECT = 'clone_direct'
DIRECT = 'direct'
TRANSIENT = 'transient'
class sevenbridges.models.enums.AppRawFormat[source]

Bases: object

JSON = 'json'
YAML = 'yaml'
class sevenbridges.models.enums.AsyncFileOperations[source]

Bases: object

COPY = 'copy'
DELETE = 'delete'
MOVE = 'move'
class sevenbridges.models.enums.AsyncJobStates[source]

Bases: object

FINISHED = 'FINISHED'
RESOLVING = 'RESOLVING'
RUNNING = 'RUNNING'
SUBMITTED = 'SUBMITTED'
class sevenbridges.models.enums.AutomationRunActions[source]

Bases: object

RERUN = 'rerun'
STOP = 'stop'
class sevenbridges.models.enums.AutomationStatus[source]

Bases: object

ABORTED = 'ABORTED'
CREATED = 'CREATED'
FAILED = 'FAILED'
FINISHED = 'FINISHED'
QUEUED_FOR_EXECUTION = 'QUEUED_FOR_EXECUTION'
QUEUED_FOR_TERMINATION = 'QUEUED_FOR_TERMINATION'
RUNNING = 'RUNNING'
SENT_TO_EXECUTION = 'SENT_TO_EXECUTION'
terminal_states = ['FINISHED', 'FAILED', 'ABORTED']
class sevenbridges.models.enums.DivisionRole[source]

Bases: object

ADMIN = 'admin'
EXTERNAL_COLLABORATOR = 'external_collaborator'
MEMBER = 'member'
class sevenbridges.models.enums.FeedbackType[source]

Bases: object

IDEA = 'IDEA'
PROBLEM = 'PROBLEM'
THOUGHT = 'THOUGHT'
class sevenbridges.models.enums.FileApiFormats[source]

Bases: object

FILE = 'File'
FOLDER = 'Directory'
class sevenbridges.models.enums.FileStorageType[source]

Bases: object

PLATFORM = 'PLATFORM'
VOLUME = 'VOLUME'
class sevenbridges.models.enums.ImportExportState[source]

Bases: object

COMPLETED = 'COMPLETED'
FAILED = 'FAILED'
PENDING = 'PENDING'
RUNNING = 'RUNNING'
class sevenbridges.models.enums.PartSize[source]

Bases: object

DOWNLOAD_MINIMUM_PART_SIZE = 5242880
GB = 1073741824
KB = 1024
MAXIMUM_OBJECT_SIZE = 5497558138880
MAXIMUM_TOTAL_PARTS = 10000
MAXIMUM_UPLOAD_SIZE = 5368709120
MB = 1048576
TB = 1099511627776
UPLOAD_MINIMUM_PART_SIZE = 5242880
class sevenbridges.models.enums.RequestParameters[source]

Bases: object

DEFAULT_BACKOFF_FACTOR = 1
DEFAULT_BULK_LIMIT = 100
DEFAULT_RETRY_COUNT = 6
DEFAULT_TIMEOUT = 300
MAX_URL_LENGTH = 6000
class sevenbridges.models.enums.TaskStatus[source]

Bases: object

ABORTED = 'ABORTED'
ABORTING = 'ABORTING'
COMPLETED = 'COMPLETED'
CREATING = 'CREATING'
DRAFT = 'DRAFT'
FAILED = 'FAILED'
QUEUED = 'QUEUED'
RUNNING = 'RUNNING'
terminal_states = ['COMPLETED', 'FAILED', 'ABORTED']
class sevenbridges.models.enums.TransferState[source]

Bases: object

ABORTED = 'ABORTED'
COMPLETED = 'COMPLETED'
FAILED = 'FAILED'
PAUSED = 'PAUSED'
PREPARING = 'PREPARING'
RUNNING = 'RUNNING'
STOPPED = 'STOPPED'
class sevenbridges.models.enums.VolumeAccessMode[source]

Bases: object

READ_ONLY = 'RO'
READ_WRITE = 'RW'
class sevenbridges.models.enums.VolumeType[source]

Bases: object

GOOGLE = 'GCS'
OSS = 'OSS'
S3 = 'S3'

sevenbridges.models.execution_details module

class sevenbridges.models.execution_details.ExecutionDetails(**kwargs)[source]

Bases: Resource

Task execution details.

deepcopy()
end_time = None
equals(other)
href = None
jobs
message = None
start_time = None
status = None

sevenbridges.models.file module

class sevenbridges.models.file.File(**kwargs)[source]

Bases: Resource

Central resource for managing files.

FOLDER_TYPE = 'folder'
classmethod bulk_delete(files, api=None)[source]

Delete files with specified ids in bulk :param files: Files to be deleted. :param api: Api instance. :return: List of FileBulkRecord objects.

classmethod bulk_edit(files, api=None)[source]

This call edits the details for multiple specified files. Use this call to modify the existing information for the files or add new information while preserving omitted parameters. For each of the specified files, the call edits its name, tags and metadata. :param files: List of file instances. :param api: Api instance. :return: List of FileBulkRecord objects.

classmethod bulk_get(files, api=None)[source]

Retrieve files with specified ids in bulk :param files: Files to be retrieved. :param api: Api instance. :return: List of FileBulkRecord objects.

classmethod bulk_update(files, api=None)[source]

This call updates the details for multiple specified files. Use this call to set new information for the files, thus replacing all existing information and erasing omitted parameters. For each of the specified files, the call sets a new name, new tags and metadata. :param files: List of file instances. :param api: Api instance. :return: List of FileBulkRecord objects.

content(path=None, overwrite=True, encoding='utf-8')[source]

Downloads file to the specified path or as temporary file and reads the file content in memory. Should not be used on very large files. :param path: Path for file download If omitted tmp file will be used. :param overwrite: Overwrite file if exists locally :param encoding: File encoding, by default it is UTF-8 :return: File content.

copy(project, name=None)[source]

Copies the current file. :param project: Destination project. :param name: Destination file name. :return: Copied File object.

copy_to_folder(parent, name=None, api=None)[source]

Copy file to folder :param parent: Folder to copy file to :param name: New file name :param api: Api instance :return: New file instance

classmethod create_folder(name, parent=None, project=None, api=None)[source]

Create a new folder :param name: Folder name :param parent: Parent folder :param project: Project to create folder in :param api: Api instance :return: New folder

created_on = None
deepcopy()
download(path, retry=6, timeout=300, chunk_size=None, wait=True, overwrite=False)[source]

Downloads the file and returns a download handle. Download will not start until .start() method is invoked. :param path: Full path to the new file. :param retry: Number of retries if error occurs during download. :param timeout: Timeout for http requests. :param chunk_size: Chunk size in bytes. :param wait: If true will wait for download to complete. :param overwrite: If True will silently overwrite existing file. :return: Download handle.

download_info()[source]

Fetches download information containing file url that can be used to download file. :return: Download info object.

equals(other)
href = None
id = None
is_folder()[source]
list_files(offset=None, limit=None, api=None, cont_token=None)[source]

List files in a folder :param api: Api instance :param offset: Pagination offset :param limit: Pagination limit :param cont_token: Pagination continuation token :return: List of files

metadata
modified_on = None
move_to_folder(parent, name=None, api=None)[source]

Move file to folder :param parent: Folder to move file to :param name: New file name :param api: Api instance :return: New file instance

name = None
origin
parent = None
project = None
classmethod query(project=None, names=None, metadata=None, origin=None, tags=None, offset=None, limit=None, dataset=None, api=None, parent=None, cont_token=None)[source]

Query ( List ) files, requires project or dataset :param project: Project id :param names: Name list :param metadata: Metadata query dict :param origin: Origin query dict :param tags: List of tags to filter on :param offset: Pagination offset :param limit: Pagination limit :param dataset: Dataset id :param api: Api instance. :param parent: Folder id or File object with type folder :param cont_token: Pagination continuation token :return: Collection object.

reload()[source]

Refreshes the file with the data from the server.

save(*args, **kwargs)
classmethod search(query, cont_token=None, limit=None, api=None)[source]

Search files by a query. :param query: Query written in SBG query language. :param cont_token: Continuation token value. :param limit: Limit value. :param api: Api instance.

property secondary_files
size = None
storage
stream(part_size=32768)[source]

Creates an iterator which can be used to stream the file content. :param part_size: Size of the part in bytes. Default 32KB :return Iterator

tags = None
type = None
classmethod upload(path, project=None, parent=None, file_name=None, overwrite=False, retry=6, timeout=300, part_size=None, wait=True, api=None)[source]

Uploads a file using multipart upload and returns an upload handle if the wait parameter is set to False. If wait is set to True it will block until the upload is completed.

Parameters:
  • path – File path on local disc.

  • project – Project identifier

  • parent – Parent folder identifier

  • file_name – Optional file name.

  • overwrite – If true will overwrite the file on the server.

  • retry – Number of retries if error occurs during upload.

  • timeout – Timeout for http requests.

  • part_size – Part size in bytes.

  • wait – If true will wait for upload to complete.

  • api – Api instance.

class sevenbridges.models.file.FileBulkRecord(**kwargs)[source]

Bases: BulkRecord

deepcopy()
equals(other)
resource
class sevenbridges.models.file.SearchResponse(**kwargs)[source]

Bases: Resource

cont_token = None
count = None
deepcopy()
equals(other)
result_set = None

sevenbridges.models.invoice module

class sevenbridges.models.invoice.Invoice(**kwargs)[source]

Bases: Resource

Central resource for managing invoices.

analysis_costs
deepcopy()
equals(other)
href = None
id = None
invoice_period
pending = None
classmethod query(offset=None, limit=None, api=None)[source]

Query (List) invoices. :param offset: Pagination offset. :param limit: Pagination limit. :param api: Api instance. :return: Collection object.

storage_costs
total

sevenbridges.models.marker module

class sevenbridges.models.marker.Marker(**kwargs)[source]

Bases: Resource

chromosome = None
classmethod create(file, name, position, chromosome, private=True, api=None)[source]

Create a marker on a file. :param file: File object or identifier. :param name: Marker name. :param position: Marker position object. :param chromosome: Chromosome number. :param private: Whether the marker is private or public. :param api: Api instance. :return: Marker object.

created_by = None
created_time = None
deepcopy()
equals(other)
file = None
href = None
id = None
name = None
position
classmethod query(file, offset=None, limit=None, api=None)[source]

Queries genome markers on a file. :param file: Genome file - Usually bam file. :param offset: Pagination offset. :param limit: Pagination limit. :param api: Api instance. :return: Collection object.

save(*args, **kwargs)

sevenbridges.models.member module

class sevenbridges.models.member.Member(**kwargs)[source]

Bases: Resource

Central resource for managing members. This resource is reused on both projects and volumes.

deepcopy()
email = None
equals(other)
href = None
id = None
permissions
save(*args, **kwargs)
type = None
username = None

sevenbridges.models.project module

class sevenbridges.models.project.Project(**kwargs)[source]

Bases: Resource

Central resource for managing projects.

add_files(files)[source]

Adds files to this project. :param files: List of files or a Collection object.

add_member(user, permissions)[source]

Add a member to the project. :param user: Member username :param permissions: Permissions dictionary. :return: Member object.

add_member_division(division, permissions)[source]

Add a member (team) to a project. :param division: Division object or division identifier. :param permissions: Permissions dictionary. :return: Member object.

add_member_email(email, permissions=None)[source]

Add a member to the project using member email. :param email: Member email. :param permissions: Permissions dictionary. :return: Member object.

add_member_team(team, permissions)[source]

Add a member (team) to a project. :param team: Team object or team identifier. :param permissions: Permissions dictionary. :return: Member object.

billing_group = None
category = None
classmethod create(name, billing_group=None, description=None, tags=None, settings=None, api=None)[source]

Create a project. :param name: Project name. :param billing_group: Project billing group. :param description: Project description. :param tags: Project tags. :param settings: Project settings. :param api: Api instance. :return:

create_task(name, app, revision=None, batch_input=None, batch_by=None, inputs=None, description=None, run=False, disable_batch=False, interruptible=True, execution_settings=None)[source]

Creates a task for this project.

Parameters:
  • name – Task name.

  • app – CWL app identifier.

  • revision – CWL app revision.

  • batch_input – Batch input.

  • batch_by – Batch criteria.

  • inputs – Input map.

  • description – Task description.

  • run – True if you want to run a task upon creation.

  • disable_batch – True if you want to disable batching.

  • interruptible – True if you want to use interruptible instances.

  • execution_settings – Execution settings for the task.

Returns:

Task object.

created_by = None
created_on = None
deepcopy()
description = None
equals(other)
get_apps(offset=None, limit=None)[source]

Retrieves apps in this project. :param offset: Pagination offset. :param limit: Pagination limit. :return: Collection object.

get_exports(volume=None, state=None, offset=None, limit=None)[source]

Fetches exports for this volume. :param volume: Optional volume identifier. :param state: Optional state. :param offset: Pagination offset. :param limit: Pagination limit. :return: Collection object.

get_files(offset=None, limit=None)[source]

Retrieves files in this project. :param offset: Pagination offset. :param limit: Pagination limit. :return: Collection object.

get_imports(volume=None, state=None, offset=None, limit=None)[source]

Fetches imports for this project. :param volume: Optional volume identifier. :param state: Optional state. :param offset: Pagination offset. :param limit: Pagination limit. :return: Collection object.

get_member(username, api=None)[source]

Fetches information about a single project member :param username: Member name :param api: Api instance :return: Member object

get_members(offset=None, limit=None)[source]

Retrieves project members. :param offset: Pagination offset. :param limit: Pagination limit. :return: Collection object.

get_tasks(status=None, offset=None, limit=None)[source]

Retrieves tasks in this project. :param status: Optional task status. :param offset: Pagination offset. :param limit: Pagination limit. :return: Collection object.

href = None
id = None
modified_on = None
name = None
classmethod query(owner=None, name=None, offset=None, limit=None, api=None, category=None, tags=None)[source]

Query (List) projects :param owner: Owner username. :param name: Project name :param offset: Pagination offset. :param limit: Pagination limit. :param api: Api instance. :param category: Project category. :param tags: Project tags. :return: Collection object.

remove_member(user)[source]

Remove member from the project. :param user: User to be removed.

root_folder = None
save(*args, **kwargs)
settings
tags = None
type = None

sevenbridges.models.rate_limit module

class sevenbridges.models.rate_limit.RateLimit(**kwargs)[source]

Bases: Resource

Rate limit resource contains info regarding request and computation rate limits.

deepcopy()
equals(other)
classmethod get(id=None, api=None)[source]

Fetches the resource from the server. :param id: Resource identifier :param api: sevenbridges Api instance. :return: Resource object.

instance_limit
rate

sevenbridges.models.storage_export module

class sevenbridges.models.storage_export.Export(**kwargs)[source]

Bases: Resource

Central resource for managing exports.

classmethod bulk_get(exports, api=None)[source]

Retrieve exports in bulk. :param exports: Exports to be retrieved. :param api: Api instance. :return: list of ExportBulkRecord objects.

classmethod bulk_submit(exports, copy_only=False, api=None)[source]

Create exports in bulk. :param exports: List of dicts describing a wanted export. :param copy_only: If true files are kept on SevenBridges bucket. :param api: Api instance. :return: list of ExportBulkRecord objects.

deepcopy()
destination
equals(other)
error
finished_on = None
href = None
id = None
overwrite = None
properties
classmethod query(volume=None, state=None, offset=None, limit=None, api=None)[source]

Query (List) exports. :param volume: Optional volume identifier. :param state: Optional import sate. :param offset: Pagination offset. :param limit: Pagination limit. :param api: Api instance. :return: Collection object.

property result
property source
started_on = None
state = None
classmethod submit_export(file, volume, location, properties=None, overwrite=False, copy_only=False, api=None)[source]

Submit new export job. :param file: File to be exported. :param volume: Volume identifier. :param location: Volume location. :param properties: Properties dictionary. :param overwrite: If true it will overwrite file if exists :param copy_only: If true files are kept on SevenBridges bucket. :param api: Api Instance. :return: Export object.

class sevenbridges.models.storage_export.ExportBulkRecord(**kwargs)[source]

Bases: BulkRecord

deepcopy()
equals(other)
resource

sevenbridges.models.storage_import module

class sevenbridges.models.storage_import.Import(**kwargs)[source]

Bases: Resource

Central resource for managing imports.

autorename = None
classmethod bulk_get(imports, api=None)[source]

Retrieve imports in bulk :param imports: Imports to be retrieved. :param api: Api instance. :return: List of ImportBulkRecord objects.

classmethod bulk_submit(imports, api=None)[source]

Submit imports in bulk :param imports: List of dicts describing a wanted import. :param api: Api instance. :return: List of ImportBulkRecord objects.

deepcopy()
destination
equals(other)
error
finished_on = None
href = None
id = None
overwrite = None
preserve_folder_structure = None
classmethod query(project=None, volume=None, state=None, offset=None, limit=None, api=None)[source]

Query (List) imports. :param project: Optional project identifier. :param volume: Optional volume identifier. :param state: Optional import sate. :param offset: Pagination offset. :param limit: Pagination limit. :param api: Api instance. :return: Collection object.

property result
source
started_on = None
state = None
classmethod submit_import(volume, location, project=None, name=None, overwrite=False, properties=None, parent=None, preserve_folder_structure=True, autorename=False, api=None)[source]

Submits new import job. :param volume: Volume identifier. :param location: Volume location. :param project: Project identifier. :param name: Optional file name. :param overwrite: If true it will overwrite file if exists. :param properties: Properties dictionary. :param parent: The ID of the target folder to which the item should be imported. Should not be used together with project. :param preserve_folder_structure: Whether to keep the exact source folder structure. The default value is true if the item being imported is a folder. Should not be used if you are importing a file. :param autorename: Whether to automatically rename the item (by prefixing its name with an underscore and number) if another one with the same name already exists at the destination. :param api: Api instance. :return: Import object.

class sevenbridges.models.storage_import.ImportBulkRecord(**kwargs)[source]

Bases: BulkRecord

deepcopy()
equals(other)
resource

sevenbridges.models.task module

class sevenbridges.models.task.Task(**kwargs)[source]

Bases: Resource

Central resource for managing tasks.

abort(*args, **kwargs)
app = None
batch = None
batch_by
batch_group
batch_input = None
classmethod bulk_get(tasks, api=None)[source]

Retrieve tasks with specified ids in bulk :param tasks: Tasks to be retrieved. :param api: Api instance. :return: List of TaskBulkRecord objects.

clone(run=True)[source]

Clone task :param run: run task after cloning :return: Task object.

classmethod create(name, project, app, revision=None, batch_input=None, batch_by=None, inputs=None, description=None, run=False, disable_batch=False, interruptible=None, execution_settings=None, output_location=None, api=None)[source]

Creates a task on server. :param name: Task name. :param project: Project identifier. :param app: CWL app identifier. :param revision: CWL app revision. :param batch_input: Batch input. :param batch_by: Batch criteria. :param inputs: Input map. :param description: Task description. :param run: True if you want to run a task upon creation. :param disable_batch: If True disables batching of a batch task. :param interruptible: If True interruptible instance will be used. :param execution_settings: Execution settings for the task. :param output_location: Dictionary that allows you to define the exact location where your task outputs will be stored. :param api: Api instance. :return: Task object. :raises: TaskValidationError if validation Fails. :raises: SbgError if any exception occurs during request.

created_by = None
created_time = None
deepcopy()
description = None
end_time = None
equals(other)
errors = None
executed_by = None
execution_settings = None
execution_status
get_batch_children(status=None, created_from=None, created_to=None, started_from=None, started_to=None, ended_from=None, ended_to=None, order_by=None, order=None, offset=None, limit=None, api=None)[source]

Retrieves batch child tasks for this task if its a batch task. :return: Collection instance. :raises SbError if task is not a batch task.

get_execution_details()[source]

Retrieves execution details for a task. :return: Execution details instance.

href = None
id = None
inputs
name = None
origin = None
output_location = None
outputs
parent = None
price
project = None
classmethod query(project=None, status=None, batch=None, parent=None, created_from=None, created_to=None, started_from=None, started_to=None, ended_from=None, ended_to=None, offset=None, limit=None, order_by=None, order=None, origin=None, api=None)[source]

Query (List) tasks. Date parameters may be both strings and python date objects. :param project: Target project. optional. :param status: Task status. :param batch: Only batch tasks. :param parent: Parent batch task identifier. :param ended_to: All tasks that ended until this date. :param ended_from: All tasks that ended from this date. :param started_to: All tasks that were started until this date. :param started_from: All tasks that were started from this date. :param created_to: All tasks that were created until this date. :param created_from: All tasks that were created from this date. :param offset: Pagination offset. :param limit: Pagination limit. :param order_by: Property to order by. :param order: Ascending or descending ordering. :param origin: Entity that created the task, e.g. automation run, if task was created by an automation run. :param api: Api instance. :return: Collection object.

run(*args, **kwargs)
save(*args, **kwargs)
start_time = None
status = None
type = None
use_interruptible_instances = None
wait(period=10, callback=None, *args, **kwargs)[source]

Wait until task is complete :param period: Time in seconds between reloads :param callback: Function to call after the task has finished, arguments and keyword arguments can be provided for it :return: Return value of provided callback function or None if a callback function was not provided

warnings = None
class sevenbridges.models.task.TaskBulkRecord(**kwargs)[source]

Bases: BulkRecord

deepcopy()
equals(other)
resource

sevenbridges.models.team module

class sevenbridges.models.team.Team(**kwargs)[source]

Bases: Resource

Central resource for managing teams.

add_member(user)[source]

Add member to team :param user: User object or user’s username :return: Added user.

classmethod create(name, division, api=None)[source]

Create team within a division :param name: Team name. :param division: Parent division. :param api: Api instance. :return: Team object.

deepcopy()
equals(other)
get_members(offset=None, limit=None)[source]

Fetch team members for current team. :param offset: Pagination offset. :param limit: Pagination limit. :return: Collection object.

href = None
id = None
name = None
classmethod query(division, list_all=False, offset=None, limit=None, api=None)[source]
Parameters:
  • division – Division slug.

  • list_all – List all teams in division.

  • offset – Pagination offset.

  • limit – Pagination limit.

  • api – Api instance.

Returns:

Collection object.

remove_member(user)[source]

Remove member from the team. :param user: User to be removed.

save(*args, **kwargs)

sevenbridges.models.team_member module

class sevenbridges.models.team_member.TeamMember(**kwargs)[source]

Bases: Resource

Central resource for managing team members.

deepcopy()
equals(other)
href = None
id = None
role = None
username = None

sevenbridges.models.user module

class sevenbridges.models.user.User(**kwargs)[source]

Bases: Resource

Central resource for managing users.

address = None
affiliation = None
city = None
country = None
deepcopy()
disable(api=None)[source]

Disable user :param api: Api instance. :return:

email = None
equals(other)
first_name = None
classmethod get(user, api=None)[source]

Fetches the resource from the server. :param id: Resource identifier :param api: sevenbridges Api instance. :return: Resource object.

href = None
last_name = None
classmethod me(api=None)[source]

Retrieves current user information. :param api: Api instance. :return: User object.

phone = None
classmethod query(division, role=None, offset=None, limit=None, api=None)[source]

Query division users :param division: Division slug. :param role: User role in division. :param offset: Pagination offset. :param limit: Pagination limit. :param api: Api instance. :return: Collection object.

role = None
state = None
username = None
zip_code = None

sevenbridges.models.volume module

class sevenbridges.models.volume.Volume(**kwargs)[source]

Bases: Resource

Central resource for managing volumes.

access_mode = None
active = None
add_member(user, permissions)[source]

Add a member to the volume. :param user: Member username :param permissions: Permissions dictionary. :return: Member object.

add_member_division(division, permissions)[source]

Add a member (team) to a volume. :param division: Division object or division identifier. :param permissions: Permissions dictionary. :return: Member object.

add_member_team(team, permissions)[source]

Add a member (team) to a volume. :param team: Team object or team identifier. :param permissions: Permissions dictionary. :return: Member object.

classmethod create_google_iam_volume(name, bucket, configuration, access_mode, description=None, prefix=None, properties=None, api=None)[source]

Create google volume. :param name: Volume name. :param bucket: Referenced bucket. :param configuration: Google configuration. :param access_mode: Access Mode. :param description: Volume description. :param prefix: Volume prefix. :param properties: Volume properties. :param api: Api instance. :return: Volume object.

classmethod create_google_volume(name, bucket, client_email, private_key, access_mode, description=None, prefix=None, properties=None, api=None)[source]

Create google volume. :param name: Volume name. :param bucket: Referenced bucket. :param client_email: Google client email. :param private_key: Google client private key. :param access_mode: Access Mode. :param description: Volume description. :param prefix: Volume prefix. :param properties: Volume properties. :param api: Api instance. :return: Volume object.

classmethod create_oss_volume(name, bucket, endpoint, access_key_id, secret_access_key, access_mode, description=None, prefix=None, properties=None, api=None)[source]

Create oss volume. :param name: Volume name. :param bucket: Referenced bucket. :param access_key_id: Access key identifier. :param secret_access_key: Secret access key. :param access_mode: Access Mode. :param endpoint: Volume Endpoint. :param description: Volume description. :param prefix: Volume prefix. :param properties: Volume properties. :param api: Api instance. :return: Volume object.

classmethod create_s3_volume(name, bucket, access_key_id, secret_access_key, access_mode, description=None, prefix=None, properties=None, api=None)[source]

Create s3 volume. :param name: Volume name. :param bucket: Referenced bucket. :param access_key_id: Amazon access key identifier. :param secret_access_key: Amazon secret access key. :param access_mode: Access Mode. :param description: Volume description. :param prefix: Volume prefix. :param properties: Volume properties. :param api: Api instance. :return: Volume object.

classmethod create_s3_volume_role_auth(name, bucket, role_arn, external_id, access_mode, description=None, prefix=None, properties=None, api=None)[source]

Create s3 volume using IAM Role auth. :param name: Volume name. :param bucket: Referenced bucket. :param role_arn: Amazon role ARN. :param external_id: Amazon role external id. :param access_mode: Access Mode. :param description: Volume description. :param prefix: Volume prefix. :param properties: Volume properties. :param api: Api instance. :return: Volume object.

created_on = None
deepcopy()
description = None
equals(other)
get_exports(state=None, offset=None, limit=None)[source]

Fetches exports for this volume. :param state: Optional state. :param offset: Pagination offset. :param limit: Pagination limit. :return: Collection object.

get_imports(project=None, state=None, offset=None, limit=None)[source]

Fetches imports for this volume. :param project: Optional project identifier. :param state: Optional state. :param offset: Pagination offset. :param limit: Pagination limit. :return: Collection object.

get_member(username, api=None)[source]

Fetches information about a single volume member :param username: Member name :param api: Api instance :return: Member object

get_members(offset=None, limit=None)[source]

Retrieves volume members. :param offset: Pagination offset. :param limit: Pagination limit. :return: Collection object.

get_volume_object_info(location)[source]

Fetches information about single volume object - usually file :param location: object location :return:

href = None
id = None
list(prefix=None, limit=None, fields='_all')[source]
modified_on = None
name = None
classmethod query(offset=None, limit=None, api=None)[source]

Query (List) volumes. :param offset: Pagination offset. :param limit: Pagination limit. :param api: Api instance. :return: Collection object.

remove_member(user)[source]

Remove member from the volume. :param user: User to be removed.

save(*args, **kwargs)
service