Skip to main content

A command-line tool to manage, deploy, and launch PathoLens with Google Colab or local backends.

Project description

๐Ÿ”ฌ PathoLens Digital Pathology Workstation

PathoLens is a digital pathology workstation & AI workspace with a command-line launcher supporting Local Machine and Google Colab Cloud VM execution backends.


๐Ÿš€ Key Features

  • Dual Deployment Target: Run completely locally on your hardware, or spin up a free Google Colab GPU-accelerated cloud VM with one command.
  • Zero-friction Colab Deploy (Zero Code Uploads): The CLI uses PyPI directly. Instead of slow zip uploads of the codebase, it initiates a PyPI installation (uv pip install) over Google's datacenter backbone (under 5 seconds) and only uploads the locally compiled static Next.js frontend (~6MB static.zip).
  • Dynamic Slide Directory Configuration: Switch slide folders dynamically inside the browser UI Settings modal without having to restart the backend. Point it to local directories (e.g. /home/prime/slides) or Google Drive paths (/content/drive/MyDrive/...).
  • Edge AI Diagnostics: Supports local execution of the gemma-4-E2B-it-litert-lm LiteRT model for local digital pathology clinical questions and diagnostics.

๐Ÿ“ฆ Installation

To install the CLI globally using uv:

uv tool install patholens

๐Ÿ› ๏ธ Usage

Simply run:

patholens launch

This launches the onboarding wizard in your terminal:

 โ–ˆโ–€โ–ˆโ€ƒโ–ˆโ–€โ–ˆโ€ƒโ–€โ–ˆโ–€โ€ƒโ–ˆโ–„โ–ˆโ€ƒโ–ˆโ–€โ–ˆโ€ƒโ–ˆ  โ€ƒโ–ˆโ–€โ–€โ€ƒโ–ˆโ–„ โ–ˆโ€ƒโ–ˆโ–€
 โ–ˆโ–€โ–€โ€ƒโ–ˆโ–€โ–ˆโ€ƒ โ–ˆ โ€ƒโ–ˆ โ–ˆโ€ƒโ–ˆโ–„โ–ˆโ€ƒโ–ˆโ–„โ–„โ€ƒโ–ˆโ–ˆโ–„โ€ƒโ–ˆ โ–€โ–ˆโ€ƒโ–„โ–ˆ cli v2.0.2
 ๐Ÿ”ฌ Digital Pathology Workstation & AI Workspace

 }  Environment: Cloud-Scalable / Multi-Tenant Ready
 }  Local Fallback: SQLite + Local Slide Storage

? Where would you like to run the PathoLens backend?
  1) Local Machine (Your computer's CPU/GPU)
  2) Google Colab VM (Free cloud CPU/GPU accelerators)

Option 1: Local Machine

Runs a local FastAPI backend and serves the Next.js frontend statically.

  • Local AI option: You can choose to download the litert_lm package and cache the gemma-4-E2B-it-litert-lm model for local inference.
  • Launch link: The CLI automatically opens your default browser at http://localhost:8000.

Option 2: Google Colab VM

  • Drive Integration: Prompts you to mount your Google Drive on the VM.
  • Fast Setup: Installs patholens from PyPI, uploads and extracts the frontend static.zip, installs slide bindings (libopenslide0), and opens a Cloudflare secure tunnel.
  • Direct Browser Launch: The CLI automatically grabs the public *.trycloudflare.com tunnel URL and opens it in your web browser.

โš™๏ธ Slide Directory Configuration

You can configure the active slide folder inside the browser UI dashboard.

  1. Click the Settings gear icon in the header.
  2. Input the absolute path to your slide directory (e.g. /content/drive/MyDrive/Slides on Colab, or a local directory).
  3. Click Save Settings. The backend updates its active path on the fly and immediately lists the .svs files found in the folder.

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

patholens-2.0.3.tar.gz (11.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

patholens-2.0.3-py3-none-any.whl (11.4 MB view details)

Uploaded Python 3

File details

Details for the file patholens-2.0.3.tar.gz.

File metadata

  • Download URL: patholens-2.0.3.tar.gz
  • Upload date:
  • Size: 11.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for patholens-2.0.3.tar.gz
Algorithm Hash digest
SHA256 c0d123219c217f45773b85b55d76ddb72071fe49920e0e435cd86b91465105c9
MD5 af9263ef5abbe5019e5d91f9774be983
BLAKE2b-256 c46f1b20f537d9f327201d879e1719385817a4979284abe7d7b6b312d9221731

See more details on using hashes here.

File details

Details for the file patholens-2.0.3-py3-none-any.whl.

File metadata

  • Download URL: patholens-2.0.3-py3-none-any.whl
  • Upload date:
  • Size: 11.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for patholens-2.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 544c47574e27ef123f45835391bb1cf750c6a5fa20f2fadb17c3857dc63d82ae
MD5 e6f597e5545999cdf04e69dedc562e09
BLAKE2b-256 7c0b8d29c67a99e74d88485f87e352ca46afec7ca581ebea24a9806751d245b2

See more details on using hashes here.

Supported by

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