Skip to main content

native-fisher-py

PyPI version Tests Documentation Status

Why native-fisher-py?

native-fisher-py is a self-contained alternative to the fisher-py reader. While fisher-py requires a local .NET runtime and pythonnet, this package bundles the necessary components using .NET NativeAOT and Rust to provide a consistent binary bridge.

Features

  • Drop-in Compatible: Designed to match the fisher_py.RawFile API for simplified migration.
  • Bundled .NET Components: No separate .NET runtime installation is required on the host system.
  • Cross-Platform: Pre-built binaries for macOS (ARM64/x64), Linux (x64), and Windows (x64).
  • Reliable Deployment: Easier integration into CI/CD pipelines and specialized Linux environments.

How it works

This project provides a native bridge to the official Thermo Fisher libraries using a three-layer approach:

  1. Official DLLs: Uses the original .dll assemblies provided by Thermo Fisher Scientific.
  2. C# NativeAOT Wrapper: A compiled transition layer (ThermoNativeReader) that interfaces with those DLLs.
  3. Rust PyO3 Layer: A Rust bridge (native-fisher-py) that provides the final Python bindings.

This approach ensures stability and parity with the official reader while providing a dependency-free experience for Python users.

Quick Start

# Just change the import, the rest of your code stays the same!
from native_fisher_py import RawFile

with RawFile("data.raw") as raw:
    print(f"Number of scans: {raw.number_of_scans}")
    
    # Get spectral data as high-speed NumPy arrays
    m, i, c, meta = raw.get_scan_from_scan_number(1)
    print(f"First peak at {m[0]} m/z with intensity {i[0]}")

Migrating from fisher-py

If you are currently using fisher-py, migration is as simple as:

  1. pip install native-fisher-py
  2. Update your imports:
- from fisher_py import RawFile
+ from native_fisher_py import RawFile
  1. (Optional) Uninstall fisher-py: pip uninstall fisher-py

All core methods (get_scan_from_scan_number, get_spectrum, get_chromatogram, get_ms2_scan_number_from_retention_time, etc.) are implemented with identical signatures and return types.

Quick Local Build

For convenience, you can run the included build.sh script to build both parts of the project:

./build.sh

Step-by-Step Manual Build

To build the project from source, you need .NET 8 SDK, Rust (cargo/maturin), and clang.

1. Build the C# NativeAOT Core

Navigate to the C# project and publish the NativeAOT shared library for your platform:

cd native/ThermoNativeReader

# Example for Apple Silicon (macOS arm64)
dotnet publish -r osx-arm64 -c Release -p:PublishAot=true

# Example for Linux (x64)
# dotnet publish -r linux-x64 -c Release -p:PublishAot=true

The output will be in publish/ThermoNativeReader.dylib (or .so / .dll).

2. Build the Rust Bridge

Navigate to the native_fisher_py folder and use maturin to build and install the Python package. You must point to the location of the C# library.

cd native_fisher_py

# Point to your build from Step 1
export THERMO_NATIVE_LIB=$(pwd)/../native/ThermoNativeReader/bin/Release/net8.0/osx-arm64/publish/ThermoNativeReader.dylib

maturin develop

Credits & Legal Notice

This project is powered by the Thermo Fisher Scientific RawFileReader (copyright © 2016-2026 Thermo Fisher Scientific, Inc.). All rights reserved.

The native-fisher-py package includes the official RawFileReader libraries, which remain the property of Thermo Fisher Scientific. By using this software, you agree to the terms specified in their license.

Releasing a New Version

Releases are fully automated via GitHub Actions (release.yml), but the workflow requires that the git tag strictly matches the version in native_fisher_py/Cargo.toml.

To trigger a new release and publish to PyPI:

  1. Update the version in native_fisher_py/Cargo.toml.
  2. Commit the version bump.
  3. Create and push a matching git tag:
git tag vX.Y.Z
git push origin vX.Y.Z

The GitHub Action will automatically:

  1. Verify that the git tag version matches the Cargo.toml version (failing otherwise).
  2. Build the native wheels across all platforms (macOS, Linux, Windows).
  3. Publish the final artifacts to PyPI.

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

native_fisher_py-0.4.2-cp314-cp314t-win_amd64.whl (5.5 MB view details)

Uploaded CPython 3.14tWindows x86-64

native_fisher_py-0.4.2-cp314-cp314t-manylinux_2_34_x86_64.whl (5.9 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.34+ x86-64

native_fisher_py-0.4.2-cp314-cp314t-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (11.5 MB view details)

Uploaded CPython 3.14tmacOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

native_fisher_py-0.4.2-cp313-cp313t-win_amd64.whl (5.5 MB view details)

Uploaded CPython 3.13tWindows x86-64

native_fisher_py-0.4.2-cp313-cp313t-manylinux_2_34_x86_64.whl (5.9 MB view details)

Uploaded CPython 3.13tmanylinux: glibc 2.34+ x86-64

native_fisher_py-0.4.2-cp313-cp313t-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (11.5 MB view details)

Uploaded CPython 3.13tmacOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

native_fisher_py-0.4.2-cp39-abi3-win_amd64.whl (5.5 MB view details)

Uploaded CPython 3.9+Windows x86-64

native_fisher_py-0.4.2-cp39-abi3-manylinux_2_34_x86_64.whl (6.0 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.34+ x86-64

native_fisher_py-0.4.2-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (11.5 MB view details)

Uploaded CPython 3.9+macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

File details

Details for the file native_fisher_py-0.4.2-cp314-cp314t-win_amd64.whl.

File metadata

File hashes

Hashes for native_fisher_py-0.4.2-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 e218b37773af4f477fc1f4548ee1d26b1edb73e714ed7a3566fd2bab2ce6341c
MD5 118d118b2bd434c89f8e9bfa9d361439
BLAKE2b-256 72ce70c1e6fdb87809b9196c09815313328fb475e812a8bb65e7b92bf2cbb49e

See more details on using hashes here.

Provenance

The following attestation bundles were made for native_fisher_py-0.4.2-cp314-cp314t-win_amd64.whl:

Publisher: release.yml on z3rone-org/native-fisher-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file native_fisher_py-0.4.2-cp314-cp314t-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for native_fisher_py-0.4.2-cp314-cp314t-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 f790c8854fada476ba72d1fdc886c04660ad2941c0299f77f180605db971bfa1
MD5 72be1a671d938771f9a26077b78aa40d
BLAKE2b-256 027ddab5e57e9348dac76260891a71845409de1935f5c2bfa564ca4977677e0c

See more details on using hashes here.

Provenance

The following attestation bundles were made for native_fisher_py-0.4.2-cp314-cp314t-manylinux_2_34_x86_64.whl:

Publisher: release.yml on z3rone-org/native-fisher-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file native_fisher_py-0.4.2-cp314-cp314t-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for native_fisher_py-0.4.2-cp314-cp314t-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 2ec8e2f92deaaf84f8849bf385d10a5ea7efe8c44f5ea3495c50637a5a3e3593
MD5 f60c752def3a51a00cc2b03acf83c4b4
BLAKE2b-256 829bb7ee28da403aedc303619ccfbcab2b60c1f58838c767a2315b2cf55133bc

See more details on using hashes here.

Provenance

The following attestation bundles were made for native_fisher_py-0.4.2-cp314-cp314t-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl:

Publisher: release.yml on z3rone-org/native-fisher-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file native_fisher_py-0.4.2-cp313-cp313t-win_amd64.whl.

File metadata

File hashes

Hashes for native_fisher_py-0.4.2-cp313-cp313t-win_amd64.whl
Algorithm Hash digest
SHA256 57ae1fe05cc35334b9dcd1f4efec586f05e01cdbac34474e387e50f2c2dcec9d
MD5 ff13f76af729c6e7d9904ac3a4c100f1
BLAKE2b-256 6edf112dacb48b4ff80f4028f5678093b45e08a552da08627ebab9e752a77b72

See more details on using hashes here.

Provenance

The following attestation bundles were made for native_fisher_py-0.4.2-cp313-cp313t-win_amd64.whl:

Publisher: release.yml on z3rone-org/native-fisher-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file native_fisher_py-0.4.2-cp313-cp313t-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for native_fisher_py-0.4.2-cp313-cp313t-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 da32243617c6f94e87fa6c822da442f030802682b9569b3d1820af00ba37f89c
MD5 3f095ea0c2d97c8f4dbd0af1d16405ea
BLAKE2b-256 7564b1d7f2352e97ae8d24a4211227580f39ac3d4506948472845c7cccef9707

See more details on using hashes here.

Provenance

The following attestation bundles were made for native_fisher_py-0.4.2-cp313-cp313t-manylinux_2_34_x86_64.whl:

Publisher: release.yml on z3rone-org/native-fisher-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file native_fisher_py-0.4.2-cp313-cp313t-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for native_fisher_py-0.4.2-cp313-cp313t-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 e6923dfc81b039afa6cd11eb2021fe6f71d610eab82528832d3021fbe2b95bab
MD5 7aa3fa7ae719d6beed4b9622a51970a1
BLAKE2b-256 00bbeb4c695bc33809b79cd73842673d08c82036bf7059cd1d19677711f47f68

See more details on using hashes here.

Provenance

The following attestation bundles were made for native_fisher_py-0.4.2-cp313-cp313t-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl:

Publisher: release.yml on z3rone-org/native-fisher-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file native_fisher_py-0.4.2-cp39-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for native_fisher_py-0.4.2-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 343b3148cabb524effb2e57b4a35873a98060c3b56df13e9350b553effb3ecd9
MD5 f0dd55039bf43d8bacf8fffff1528377
BLAKE2b-256 22a2709672bf9fbd80cb0567f5c6ef1ff7354f9824b3d95a38541215e3dc82f5

See more details on using hashes here.

Provenance

The following attestation bundles were made for native_fisher_py-0.4.2-cp39-abi3-win_amd64.whl:

Publisher: release.yml on z3rone-org/native-fisher-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file native_fisher_py-0.4.2-cp39-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for native_fisher_py-0.4.2-cp39-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 383e31c406805b89e35817318d4a50556b2b72fc034bf16362f5d2491844a613
MD5 a4e04344273eb967e795e140b783ea03
BLAKE2b-256 7be3a1807b6f627d471e726babdec9084d0ccaa3c9f6fa9d177ac0aaad8c225b

See more details on using hashes here.

Provenance

The following attestation bundles were made for native_fisher_py-0.4.2-cp39-abi3-manylinux_2_34_x86_64.whl:

Publisher: release.yml on z3rone-org/native-fisher-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file native_fisher_py-0.4.2-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for native_fisher_py-0.4.2-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 d724be16036a8c6209d56248014dcf0db60a3351ac6a21e8a5aab29614ad46ff
MD5 96f8d759285a1857e8c9563ce1130b69
BLAKE2b-256 10b928256353fab44011e5da69e518c0938f05a35efa083300c623402251ffdb

See more details on using hashes here.

Provenance

The following attestation bundles were made for native_fisher_py-0.4.2-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl:

Publisher: release.yml on z3rone-org/native-fisher-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.4.2 This release

9 files

0.4.1

3 files

0.4.0

3 files

0.3.1

3 files

0.3.0

3 files

0.2.6

3 files

0.2.5

3 files

0.2.4

3 files

0.2.3

3 files

0.2.2

3 files

0.2.1

3 files

0.2.0

3 files

0.1.3

3 files

0.1.2

3 files

0.1.1

3 files

0.1.0

3 files

0.0.2

3 files

0.0.1

2 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