Displays Polus Render dashboard in Jupyter Notebooks.
Project description
Polus Render
Enables the embedding of content from polus-render within Jupyer notebooks.
Requirements
- Python 3.9+
Installation
pip install polus-render
Sample usage
from polus import render
from urllib.parse import urlparse
from pathlib import Path
# Embeds a render into Jupyter notebooks at https://render.ci.ncats.io/
render()
# Renders zarr file hosted at "https://viv-demo.storage.googleapis.com/LuCa-7color_Scan1/"
render(urlparse("https://viv-demo.storage.googleapis.com/LuCa-7color_Scan1/"))
# Renders a zarr file hosted locally at "C:\Users\JeffChen\OneDrive - Axle Informatics\Documents\zarr files\pyramid.zarr"
render(Path(r"C:\Users\JeffChen\OneDrive - Axle Informatics\Documents\zarr files\pyramid.zarr"))
Functions
def render(path:ParseResult|PurePath = "", width:int=960, height:int=500, port:int=0)->None:
"""
Displays "https://render.ci.ncats.io/" with args to specify display dimensions, port to serve
.zarr files to Polus Render, and dataset to use.
Param:
path (ParseResult|Purepath): Acquired from urllib.parse.ParseResult or Path, renders url in render.
If not specified, renders default render url
width (int): width of render to be displayed, default is 960
height (int): height of render to be displayed, default is 500
port (int): Port to run local zarr server on if used (default is 0 which is the 1st available port).
Pre: port selected (if used) is not in use IF path given is Purepath
"""
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
polus-render-0.0.3.5.tar.gz
(889.8 kB
view hashes)
Built Distribution
polus_render-0.0.3.5-py3-none-any.whl
(895.2 kB
view hashes)
Close
Hashes for polus_render-0.0.3.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae85ab0d3bef99ca7d1895f6157451d3851d75f4cba7957e77fb1dcbb1db2557 |
|
MD5 | 061af34c6a43e17944bfa9607939be1f |
|
BLAKE2b-256 | c3b37376097d558f0136494e2ea58cfe30e803d7325ab9c1f31610ad78385ab5 |