Skip to main content

Displays Polus Render dashboard in Jupyter Notebooks.

Project description

Polus Render

Enables the embedding of content from polus-render within Jupyer notebooks.

image

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


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)

Uploaded Source

Built Distribution

polus_render-0.0.3.5-py3-none-any.whl (895.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page