Skip to main content

pyisyntax

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

Installation

$ pip install pyisyntax

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"])

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
    

Cutting a new release

  1. Ensure that tests are passing and everything is ready for release.
  2. Create and push a Git tag:
    $ git tag v0.1.6
    $ git push --tags
    
  3. Download the artifacts from GitHub Actions, which will include the source distribution tarball and binary wheels.
  4. Create a new release on GitHub from the tagged commit and upload the packages as attachments to the release.
  5. Also upload the packages to PyPI using Twine:
    $ uv run twine upload pyisyntax-*.tar.gz pyisyntax-*.whl
    
  6. Bump the version number in pyproject.toml and create a commit, signalling the start of development on the next version.

These files should also be added to a GitHub release.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyisyntax-0.1.7.tar.gz (259.2 kB view details)

Uploaded Source

Built Distributions

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

pyisyntax-0.1.7-cp310-abi3-win_amd64.whl (93.7 kB view details)

Uploaded CPython 3.10+Windows x86-64

pyisyntax-0.1.7-cp310-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (643.3 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pyisyntax-0.1.7-cp310-abi3-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (619.1 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.27+ ARM64manylinux: glibc 2.28+ ARM64

pyisyntax-0.1.7-cp310-abi3-macosx_11_0_arm64.whl (147.3 kB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

pyisyntax-0.1.7-cp310-abi3-macosx_10_9_x86_64.whl (159.0 kB view details)

Uploaded CPython 3.10+macOS 10.9+ x86-64

File details

Details for the file pyisyntax-0.1.7.tar.gz.

File metadata

  • Download URL: pyisyntax-0.1.7.tar.gz
  • Upload date:
  • Size: 259.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.13

File hashes

Hashes for pyisyntax-0.1.7.tar.gz
Algorithm Hash digest
SHA256 f6a9054825ec780e14e9e487b49714402266111e514e2890d0693d4890d009d6
MD5 73dfebbe1a8235a9e0f1f6b48dda21ec
BLAKE2b-256 6ef913a892859feb280e31c120d86ff1021a92931f52a29a820733c5c0027038

See more details on using hashes here.

File details

Details for the file pyisyntax-0.1.7-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: pyisyntax-0.1.7-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 93.7 kB
  • Tags: CPython 3.10+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.13

File hashes

Hashes for pyisyntax-0.1.7-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 63a485108a277a7f4e1e55da1abfcc8333b77258e1ae97f69f9a98bf1f08d6bf
MD5 a7d5ea7ec176981c8c0dc4452ec8a1f8
BLAKE2b-256 a6e487feeea23b02ae8530a0963e983e51fbdf2bc07f7e8c52caa5dfdc17e4e1

See more details on using hashes here.

File details

Details for the file pyisyntax-0.1.7-cp310-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyisyntax-0.1.7-cp310-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0e837dbb19faa95b5b461f4f2a2620aa1bfc1befc6354d00519f557bdebc99a3
MD5 b343e7e679ce3a6dd6f5ed8ff6e6a887
BLAKE2b-256 5dcbcf8576423ec63bebaddc9cbb21f7bfab7dfac9a4ab2cc3caeab9b4ec4876

See more details on using hashes here.

File details

Details for the file pyisyntax-0.1.7-cp310-abi3-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pyisyntax-0.1.7-cp310-abi3-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 c3e0e5848069b37e37c236853beb744098f3c63751ff11bc4e46482aca41d820
MD5 e7819de22c92ae57a0762aac6f2cd420
BLAKE2b-256 0d251aba5858e4e74f874d50c565f12262a8efd211667620e8bfd2f35c385620

See more details on using hashes here.

File details

Details for the file pyisyntax-0.1.7-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyisyntax-0.1.7-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 75ae31bebecc179fdb6c79787d0a572684e6c9e5ccd5fc5fd430a399d5e0c8cb
MD5 22601fa74a462286326929498f0aeafc
BLAKE2b-256 b264c5a1c87d0cb1164fc45395ce3d0dfda886ffdcd44e6ffa2c91d5b57205d1

See more details on using hashes here.

File details

Details for the file pyisyntax-0.1.7-cp310-abi3-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pyisyntax-0.1.7-cp310-abi3-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 3569c34dfc05d032c27588b42b8570238ba848017c3768dbb617605cf7f3a8e9
MD5 f7fc71adf2b46bc63e50bc5ef9bb2b60
BLAKE2b-256 d2bcf4c65fbe9d868244326c7c3fb72d7e6bf69eab5af39d8b3cd0b88de1280d

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.7 This release

6 files

0.1.6

6 files

0.1.5

5 files

0.1.4

5 files

0.1.3

5 files

0.1.2

5 files

0.1.1

5 files

0.1.0

13 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