--- id: openslide-python version: "1.4.6" license: LGPL-2.1-only AND BSD-3-Clause AND MIT AND LicenseRef-Public-Domain license_treatment: copyleft maintenance: active --- # openslide-python — Python interface to OpenSlide License: copyleft · Maintenance: active · Downloads: 270.4K/mo ## What it is and what it does OpenSlide Python wraps the OpenSlide C library to read whole-slide images—the massive, multi-resolution medical images used in digital pathology. These images can occupy tens of gigabytes uncompressed and come in proprietary formats from vendors like Aperio, Hamamatsu, Leica, Philips, Zeiss, and others; standard image tools cannot handle them. The library lets you read image data at the resolution closest to a desired zoom level without loading the entire file into RAM. The package depends on Pillow for image handling and requires Python ≥3.10 and a separate OpenSlide C library installation (≥3.4.0). It supports formats including Aperio, ARGOS, DICOM, Hamamatsu, Huron, Leica, MIRAX, Philips, Sakura, Trestle, Ventana, Zeiss, and generic tiled TIFF, and is actively maintained with wheels for modern Python versions and multiple architectures. Use it for: - Load and tile whole-slide images for web-based pathology viewers or deep-learning training pipelines - Extract regions of interest at specific zoom levels from gigabyte-scale slides in vendor formats - Build automated image analysis workflows that process whole-slide images without memory exhaustion - Integrate multi-resolution slide access into clinical decision-support or research annotation tools - Work with DICOM or CZI slides in medical imaging applications ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. OpenSlide Python provides a Python interface to read whole-slide images (virtual slides) used in digital pathology, supporting multiple vendor formats and efficient multi-resolution access to gigabyte-scale images. Yes, if you work with whole-slide images in digital pathology or medical research. The package is actively maintained, well-supported across platforms and Python versions, and solves a specialized but critical problem—standard image libraries cannot handle these formats or their scale. The main gotcha is the separate OpenSlide C library dependency. No known vulnerabilities. ## Install pip install openslide-python uv add openslide-python poetry add openslide-python ## Installing openslide-python Before you install: Medium install friction due to a compiled C dependency (OpenSlide library) that must be installed separately. The project is actively maintained with recent releases, and wheels are provided for multiple Python versions and platforms (macOS, Linux, Windows, including aarch64). License in practice: Licensed under LGPL-2.1-only with additional BSD-3-Clause, MIT, and public domain components. The copyleft LGPL treatment means derivative works must be licensed compatibly, though linking from a proprietary application is generally permitted if OpenSlide is dynamically linked. Quickstart: pip install openslide-python from openslide import OpenSlide slide = OpenSlide('path/to/slide.svs') region = slide.read_region((x, y), level, (width, height)) OpenSlide C library (≥3.4.0) must be installed separately; installation method varies by platform. Verify before relying: - Whether the OpenSlide C library (≥3.4.0) is pre-installed on target systems or must be managed separately in deployment - Performance characteristics and memory efficiency when handling specific gigabyte-scale slide formats in production - Recommended installation method for the separate OpenSlide C library dependency on different platforms ## Package facts - License: LGPL-2.1-only AND BSD-3-Clause AND MIT AND LicenseRef-Public-Domain (copyleft) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 270.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags whole-slide image reader, virtual slide python library, digital pathology image processing, high-resolution medical image access, multi-resolution slide viewer, aperio svs tiff reader, pathology image format support, medical-imaging, pathology, whole-slide-images [View on SkillFed](https://skillfed.io/packages/openslide-python) · [View on PyPI](https://pypi.org/project/openslide-python/)