PyJEM.femtus.repository

PyJEM.femtus.repository.read_plainsheet(file)

Read a plain sheet from the specified path.

Parameters:

file (str) – Path to the plain sheet file.

Returns:

Worksheet information.

Key

Type

Value

Id

str

Identifier of the opened worksheet.

Title

str

Title of the opened worksheet.

Return type:

dict

Note

Specifying a sheet that has already been loaded by FEMTUS will result in an error. This is a specification of the FEMTUS API.

Examples

>>> read_plainsheet("C:/tmp/test_plainsheet.jfw")
{'Title': 'sheet', 'Id': 'a4fef4e1-90d9-4334-bedf-671b575e2db4'}
PyJEM.femtus.repository.write_plainsheet(worksheet_id, file)

Write a plain sheet to the specified worksheet.

Parameters:
  • worksheet_id (str) – The ID of the worksheet.

  • file (str) – The file path you want to save to

Return type:

None

Examples

>>> write_plainsheet("a4fef4e1-90d9-4334-bedf-671b575e2db4", "C:/tmp/test_plainsheet.jfw")
PyJEM.femtus.repository.can_write_plainsheet(worksheet_id, file)

Check if a plain sheet can be written to the specified worksheet.

Parameters:
  • worksheet_id (str) – The ID of the worksheet.

  • file (str) – Path to the plain sheet file.

Returns:

Save availability result.

Key

Type

Value

Result

bool

True if the sheet can be saved, otherwise False.

Return type:

dict

Examples

>>> can_write_plainsheet("a4fef4e1-90d9-4334-bedf-671b575e2db4", "C:/tmp/test_plainsheet.jfw")
{'Result': True}
PyJEM.femtus.repository.read_worksheet_element(file)

Read a worksheet element from the specified path.

Parameters:

file (str) – Path to the worksheet element file.

Returns:

Worksheet element information.

Key

Type

Value

Id

str

Identifier of the opened worksheet element.

Title

str

Title of the opened worksheet element.

Return type:

dict

Examples

>>> read_worksheet_element("C:/tmp/test_element.jh5")
{'Title': 'element', 'Id': '614be024-f8a9-4e49-a086-02412d2e87af'}
PyJEM.femtus.repository.write_worksheet_element(worksheet_element_id, file)

Write a worksheet element to the specified worksheet element ID.

Parameters:
  • worksheet_element_id (str) – The ID of the worksheet element.

  • file (str) – Path to the worksheet element file.

Return type:

None

Examples

>>> write_worksheet_element('614be024-f8a9-4e49-a086-02412d2e87af', "C:/tmp/test_element.jh5")