Generic Elements
- class chemotion_api.elements.generic_element.GenericElement(generic_segments: GenericSegments, session: Connection, json_data: dict | None = None, id: int | None = None, element_type: str | None = None)
By default Chemotion ELN contains five elements: samples, reactions, wellplates, screens, and research plans. Optionally, generic elements can be added by the administration.
Usage:
>>> from chemotion_api import Instance >>> from chemotion_api.collection import Collection >>> import logging >>> try: >>> instance = Instance('http(d)://xxx.xxx.xxx').test_connection().login('<USER>', "<PASSWORD>") >>> except ConnectionError as e: >>> logging.error(f"A connection to Chemotion ({instance.host_url}) cannot be established") >>> # Get the Element 'plan' with ID 1 >>> elem = instance.get_generic_by_name('plan', 1) >>> elem.save()
- save_url() str
Retrieves the save URL, which varies based on whether the element already has an ID.
- Returns:
The save URL