Provided Methods

  • Get PL Properties by name/id
  • List PLs in a Project

Method documentation

All the examples expect that there is already a OneDataApi object initialized and assigned to a variable called "onedata_api".

### Creation of the ONE DATA Api ###
onedata_api = OneDataApi(base_url=base_url, username=user, password=pw, verify=False, timeout=999)

get

Description

Retrieves a Production Line with the given data id XOR by name and project id.

Optional request options (request_transformers, response_transformers, timeout, verify, sleep_after_response_millis, deserializer) can be specified.

Returns: ProductionLine

Parameters

PropertyTypeRequiredDefaultDescription
idUnion[str, uuid.UUID]falseNoneID of the data table
versionintfalseNoneversion number of the production line
namestrfalseNonename of the data table
project_idUnion[str, uuid.UUID]falseNoneID of the project
force_exact_matchboolfalseTrueSearch for exact match, False: Data table includes the name
force_distinctboolfalseTrueRaise exception if name is ambiguous, False: execute on first match

Usage

### Retrieval of a production line by id ###
pd: ProductionLine = onedata_api.production_lines.get(id=UUID(production_line_id))

### Retrieval of a production line by name ###
pd: ProductionLine = onedata_api.production_lines.get(name=name, project_id=project, force_distinct=True, force_exact_match=True)

paginated

Description

Lists all production lines matching the specified search parameters (page, limit, sort_by, ordering, projects, project_types, search).

Optional request options (request_transformers, response_transformers, timeout, verify, sleep_after_response_millis, deserializer) can be specified.

Returns: Paginated

Parameters

PropertyTypeRequiredDefaultDescription
pageintfalseNoneresult page
limitintfalseNoneitems per page
sort_byResourceSortPropertyfalseNonesort property
orderingSortOrderfalseNoneorder direction
projects[uuid.UUID]falseNonelist of project ids
project_types[OneDataModule]falseNonelist of OneDataModules
searchstrfalseNonestring to search for desired resources. Search is case insensitive. Name and tags are considered.

Usage

### Retrieval of production lines in projects ###
paginated: Paginated = onedata_api.production_lines.paginated(page=0,
                                                              limit=10,
                                                              search=production_line_name,
                                                              projects=[project_id])