pybiolib 1.2.187.dev1__py3-none-any.whl → 1.2.191.dev1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,6 +13,14 @@ def open_browser_window_from_notebook(url_to_open: str) -> None:
13
13
  raise Exception('Unexpected environment. This function can only be called from a notebook.') from error
14
14
 
15
15
  display_id = str(uuid.uuid4())
16
- display(Javascript(f'window.open("{url_to_open}");'), display_id=display_id)
16
+ js_code = f"""
17
+ if (!localStorage.getItem('windowOpened_{display_id}')) {{
18
+ window.open('{url_to_open}');
19
+ localStorage.setItem('windowOpened_{display_id}', 'true');
20
+ }}
21
+ """
22
+ display(Javascript(js_code), display_id=display_id)
17
23
  time.sleep(1)
24
+ # update_display clears the javascript so we don't re-open the same window.
25
+ # However, this doesn't work in all cacses, hence the above localStorage solution.
18
26
  update_display(Javascript(''), display_id=display_id)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pybiolib
3
- Version: 1.2.187.dev1
3
+ Version: 1.2.191.dev1
4
4
  Summary: BioLib Python Client
5
5
  Home-page: https://github.com/biolib
6
6
  License: MIT
@@ -17,6 +17,7 @@ Classifier: Programming Language :: Python :: 3.9
17
17
  Classifier: Programming Language :: Python :: 3.10
18
18
  Classifier: Programming Language :: Python :: 3.11
19
19
  Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
20
21
  Provides-Extra: compute-node
21
22
  Requires-Dist: appdirs (>=1.4.3)
22
23
  Requires-Dist: click (>=8.0.0)
@@ -25,7 +25,7 @@ biolib/_internal/types/file_node.py,sha256=T6BIqo662f3nwMBRqtBHYsg6YuuUaKpiokHcV
25
25
  biolib/_internal/types/resource.py,sha256=G-vPkZoe4Um6FPxsQZtRzAlbSW5sDW4NFkbjn21I3V4,372
26
26
  biolib/_internal/types/resource_version.py,sha256=sLxViYXloDDUhTDFgjegiQCj097OM1Ih1-uqlC_4ULA,174
27
27
  biolib/_internal/types/typing.py,sha256=D4EKKEe7kDx0K6lJi-H_XLtk-8w6nu2fdqn9bvzI-Xo,288
28
- biolib/_internal/utils/__init__.py,sha256=p5vsIFyu-zYqBgdSMfwW9NC_jk7rXvvCbV4Bzd3As7c,630
28
+ biolib/_internal/utils/__init__.py,sha256=ocVkYgh0Nl_JvH5eCnw_ke35Yc_2HJe8Iv9iCm-FxsM,974
29
29
  biolib/_internal/utils/multinode.py,sha256=zWrQhcVK5u_xdWX2oIM-D_2fINqNPlqF_h71fu4K8LY,8279
30
30
  biolib/_runtime/runtime.py,sha256=b6AnHtfJ2DmEspC02sOGLt7VjienFKWaiR2PmMKnC38,3931
31
31
  biolib/api/__init__.py,sha256=mQ4u8FijqyLzjYMezMUUbbBGNB3iFmkNdjXnWPZ7Jlw,138
@@ -120,8 +120,8 @@ biolib/utils/cache_state.py,sha256=u256F37QSRIVwqKlbnCyzAX4EMI-kl6Dwu6qwj-Qmag,3
120
120
  biolib/utils/multipart_uploader.py,sha256=XvGP1I8tQuKhAH-QugPRoEsCi9qvbRk-DVBs5PNwwJo,8452
121
121
  biolib/utils/seq_util.py,sha256=Ozk0blGtPur_D9MwShD02r_mphyQmgZkx-lOHOwnlIM,6730
122
122
  biolib/utils/zip/remote_zip.py,sha256=0wErYlxir5921agfFeV1xVjf29l9VNgGQvNlWOlj2Yc,23232
123
- pybiolib-1.2.187.dev1.dist-info/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
124
- pybiolib-1.2.187.dev1.dist-info/METADATA,sha256=1jDKR3ikbL1cZDkDdIae1khC_DMoga9CL-7gi4rFMdM,1512
125
- pybiolib-1.2.187.dev1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
126
- pybiolib-1.2.187.dev1.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
127
- pybiolib-1.2.187.dev1.dist-info/RECORD,,
123
+ pybiolib-1.2.191.dev1.dist-info/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
124
+ pybiolib-1.2.191.dev1.dist-info/METADATA,sha256=ndW19VWEOkT_qzAaFoUUu9HITZbVvWgTbmeDApBmF9E,1563
125
+ pybiolib-1.2.191.dev1.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
126
+ pybiolib-1.2.191.dev1.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
127
+ pybiolib-1.2.191.dev1.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 1.9.0
2
+ Generator: poetry-core 1.9.1
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any