Copyright (c) 2022 Quantori.
pesn-sdk
is a Python package that provides an interface between your Python application and PerkinElmer's external API of Signals Notebook.
We assume, that you have already contacted with PerkinElmer and have a working instance of Signals Notebook.
Visit the page https://<your signals notebook instance>/snconfig/settings/apikey
and generate an API Key
pip install pesn-sdk
Import and initialize the API instance with your Signals Notebook host and API-token
from signals_notebook.api import SignalsNotebookApi
SignalsNotebookApi.init('https://signalsnotebook.perkinelmer.cloud', '<your api key>')
Then you can perform CRUD operations with such entities as Notebook, Experiment, etc.
Create a new Notebook
from signals_notebook.entities.notebook import Notebook
notebook = Notebook.create(name='Test creation by SDK', description='Created by me')
change its fields
notebook.name = 'Changed name'
notebook.save()
finally delete it
notebook.delete()
Also, you can retrieve all existing notebooks
notebooks = Notebook.get_list()
or one specified by id
from signals_notebook.entities.entity_store import EntityStore
notebook = EntityStore.get("journal:111a8a0d-2772-47b0-b5b8-2e4faf04119e")
Deletion can be performed without retrieving the whole object if you know an id
EntityStore.delete("journal:111a8a0d-2772-47b0-b5b8-2e4faf04119e")
Jupyter Notebooks with examples see in examples folder
Quantori Python SDK for PerkinElmer Signals Notebook is released under Apache License, Version 2.0