Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

pyisyntax-fastio

A Python library for working with pathology images in the iSyntax file format, powered by libisyntax.

Installation

Pre-release wheels are distributed through the GitHub Releases page. Download the file matching your operating system and architecture, then run:

$ python -m pip install ./pyisyntax_fastio-0.2.0a1-<platform>.whl

The Windows x86-64, Linux x86-64, and macOS Intel/Apple Silicon wheels use the CPython Stable ABI (cp310-abi3) and require Python 3.10 or newer. CI tests cover CPython 3.10, 3.11, and 3.12.

Alternatively, install from a checked-out source tree with its submodule initialized:

$ git submodule update --init --recursive
$ python -m pip install .

This fork has not been published to PyPI. The existing pip install pyisyntax command installs the upstream project, not this experimental fork.

Usage

Read and display a region of the WSI via Pillow.

from isyntax import ISyntax
import PIL.Image

with ISyntax.open("my_file.isyntax") as isyntax:
    # Read pixels from the specified region into a numpy array
    pixels = isyntax.read_region(500, 500, 400, 200, level=4)
    # Convert numpy array into a PIL image
    pil_image = PIL.Image.fromarray(pixels)
    # Show the image
    pil_image.show()

Extract and save the associated macro image.

from isyntax import ISyntax

with ISyntax.open("my_file.isyntax") as isyntax:
    # The macro image will be returned as compressed JPEG data.
    jpeg_data = isyntax.read_macro_image_jpeg()
    # This JPEG data can be written directly to a file.
    with open("macro_image.jpg", "wb") as f:
        f.write(jpeg_data)
    # Alternatively, you could decompress the data using Pillow:
    # pil_image = PIL.Image.open(io.BytesIO(jpeg_data), formats=["JPEG"])

I/O backends

ISyntax.open(path) uses a native positional file source. Seekable Python file-like objects remain supported through ISyntax(stream, n_bytes) and use one atomic read_at callback per physical request. Both paths share the same decoder and strict short-read handling.

Tile reads plan missing codeblocks before decoding, read them in file-offset order, and merge only ranges separated by at most 64 KiB. A merged range is also capped at 1 MiB, limiting over-read and temporary memory use. These are private implementation details; the public NumPy/RGBA API is unchanged.

Threading safety

Pixel reads must currently run on the same Python thread that first opens an iSyntax slide. The vendored libisyntax initializes temporary-memory state only for that caller thread; calling read_tile() or read_region() from another Python thread can otherwise crash the process. pyisyntax temporarily rejects such calls with RuntimeError until the native library provides safe per-caller-thread initialization. Opening and reading a slide inside one worker thread is supported as long as that worker is also the first thread to initialize libisyntax in the process.

Provenance and licensing

This fork retains the upstream pyisyntax history and MIT license. Its modified native backend is based on libisyntax and retains the BSD-2-Clause license. See THIRD_PARTY_NOTICES.md for attribution and source links. This project is not an official release of either upstream project.

Development

Dependency management

To set up a development environment from the lock file:

  1. Ensure that you have uv installed.
  2. Create the virtual environment:
    $ uv sync --frozen
    

To modify pyisyntax project dependencies:

  1. Edit dependencies in pyproject.toml.
  2. Update the lock file using uv:
    $ uv lock
    

Metadata

Release files for pyisyntax-fastio 0.2.0a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyisyntax-fastio 0.2.0a1
File Size Uploaded
pyisyntax_fastio-0.2.0a1.tar.gz 267.2 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for pyisyntax-fastio 0.2.0a1
File
pyisyntax_fastio-0.2.0a1-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details
pyisyntax_fastio-0.2.0a1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details
pyisyntax_fastio-0.2.0a1-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details
pyisyntax_fastio-0.2.0a1-cp310-abi3-macosx_10_9_x86_64.whl CPython 3.10 abi3 macOS 10.9+ x86-64 Details

Total release size: 1.3 MB

Release files / pyisyntax_fastio-0.2.0a1.tar.gz

Download URL pyisyntax_fastio-0.2.0a1.tar.gz
Size 267.2 kB
Tags Source
SHA-256 checksum
How to use checksums
46f72b1ff25731458229daba94692994145a6647387a1ba79d4c8f294a8f54d9
BLAKE2b-256 checksum
How to use checksums
9b74f9041c81e0f1ee7b5e7ca473285b8bf54fcc2a7d28d796fba437674d6ee5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 17, 2026.

Transparency log

Release files / pyisyntax_fastio-0.2.0a1-cp310-abi3-win_amd64.whl

Download URL pyisyntax_fastio-0.2.0a1-cp310-abi3-win_amd64.whl
Size 101.0 kB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
864cc2f4d783d7fda05390947df89bd982824596c3404083eae376a7b46511b4
BLAKE2b-256 checksum
How to use checksums
39101d1613ee7fd0498102b4febebedcac4496ad3acc0486cb6869e422a1d185
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 17, 2026.

Transparency log

Release files / pyisyntax_fastio-0.2.0a1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pyisyntax_fastio-0.2.0a1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 608.3 kB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
def1f121788bef811c4e0877c00d30af3dd1166e43946daa037698507c96c8a8
BLAKE2b-256 checksum
How to use checksums
7771bea553ff5a8fa48672fa96b270d8ed67e5860c2ba659a30eb15f2fed1370
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 17, 2026.

Transparency log

Release files / pyisyntax_fastio-0.2.0a1-cp310-abi3-macosx_11_0_arm64.whl

Download URL pyisyntax_fastio-0.2.0a1-cp310-abi3-macosx_11_0_arm64.whl
Size 148.9 kB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
b7ff2a9f1201c72c57f21e08e43385c67e94e85be970012e7f15f39269ea5946
BLAKE2b-256 checksum
How to use checksums
d69784dc32db38e6b7e2f4514df583dc6e41e32f954833422020b612fb7aee00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 17, 2026.

Transparency log

Release files / pyisyntax_fastio-0.2.0a1-cp310-abi3-macosx_10_9_x86_64.whl

Download URL pyisyntax_fastio-0.2.0a1-cp310-abi3-macosx_10_9_x86_64.whl
Size 160.4 kB
Tags CPython 3.10 abi3 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
826ba64cf72190f012f5ac11d4e61d1afc60821e13c302104827ce7a2c0e7977
BLAKE2b-256 checksum
How to use checksums
09657fa3d3364a06d2bd6032e709846a767839963168acd8a2e29737cded5ee2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 17, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0a1 This release

5 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page