Notebook Integration
Use the DesignerAdapter API to open the designer interface on a topology instanace within a cell when running in a colab or jupyter notebook
DesignerAdapter
Bases: Adapter
Source code in hyrrokkin/notebook_integration/designer_adapter.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | |
__init__(topology, port=None, quiet=True)
Start a service supporting the opening hyrrokkin's designer UI inside a jupyter or colab notebook.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
topology
|
Topology
|
a topology instance to work with |
required |
port
|
int | None
|
a port number (optional). If not provided, may be selected using portpicker with a fallback to 9103. |
None
|
quiet
|
bool
|
suppress messages except for essential ones |
True
|
Source code in hyrrokkin/notebook_integration/designer_adapter.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | |
open_configuration(package_id, page_id='', language='', window_width='95%', window_height=600)
Open a package configuration page in a notebook cell
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
package_id
|
the package's ID |
required | |
page_id
|
the page's ID. use the package configuration's first page if not given. |
''
|
|
language
|
the language code to localise the page (leave empty if no localisation or use the default language) |
''
|
|
window_width
|
the width of the window in pixels or as a string percentage |
'95%'
|
|
window_height
|
the height of the window in pixels or as a string percentage |
600
|
Source code in hyrrokkin/notebook_integration/designer_adapter.py
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | |
open_designer(window_width='95%', window_height=600)
Open the designer window in a notebook cell
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
window_width
|
int | str
|
the width of the designer window in pixels or as a string percentage |
'95%'
|
window_height
|
int | str
|
the height of the designer window in pixels or as a string percentage |
600
|
Source code in hyrrokkin/notebook_integration/designer_adapter.py
43 44 45 46 47 48 49 50 51 52 53 54 | |
open_node(node_id, page_id='', language='', window_width='95%', window_height=600)
Open a node's page in a notebook cell
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node_id
|
the node's ID |
required | |
page_id
|
the page's ID. use the node's first page if not given. |
''
|
|
language
|
the language code to localise the page (leave empty if no localisation or use the default language) |
''
|
|
window_width
|
the width of the window in pixels or as a string percentage |
'95%'
|
|
window_height
|
the height of the window in pixels or as a string percentage |
600
|
Source code in hyrrokkin/notebook_integration/designer_adapter.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | |
Use the DirectoryAdapter API to open the directory interface within a cell
DirectoryAdapter
Bases: Adapter
Source code in hyrrokkin/notebook_integration/directory_adapter.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | |
__init__(topology_directory, port=None, quiet=True)
Start a service supporting the opening hyrrokkin's directory UI inside a jupyter or colab notebook.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
topology_directory
|
TopologyDirectory
|
a TopologyDirectory instance to work with |
required |
port
|
int | None
|
a port number (optional). If not provided, may be selected using portpicker with a fallback to 9102. |
None
|
quiet
|
bool
|
suppress messages except for essential ones |
True
|
Source code in hyrrokkin/notebook_integration/directory_adapter.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | |