Drop-in replacement for fisher-py without dotnet required
Project description
native-fisher-py
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.RawFileAPI 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:
- Official DLLs: Uses the original
.dllassemblies provided by Thermo Fisher Scientific. - C# NativeAOT Wrapper: A compiled transition layer (
ThermoNativeReader) that interfaces with those DLLs. - 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:
pip install native-fisher-py- Update your imports:
- from fisher_py import RawFile
+ from native_fisher_py import RawFile
- (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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file native_fisher_py-0.2.4-cp39-abi3-win_amd64.whl.
File metadata
- Download URL: native_fisher_py-0.2.4-cp39-abi3-win_amd64.whl
- Upload date:
- Size: 4.9 MB
- Tags: CPython 3.9+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b63e7acd390ae80f6631597e77b21479ad8755fc3906e00c447d5cbdf78d4f6
|
|
| MD5 |
e396e50876eb29d79fffbda384faed00
|
|
| BLAKE2b-256 |
927df7852e7a88d1137ac460ab615832cf88c7de29554e24c3159503741c0ab6
|
Provenance
The following attestation bundles were made for native_fisher_py-0.2.4-cp39-abi3-win_amd64.whl:
Publisher:
release.yml on z3rone-org/native-fisher-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
native_fisher_py-0.2.4-cp39-abi3-win_amd64.whl -
Subject digest:
3b63e7acd390ae80f6631597e77b21479ad8755fc3906e00c447d5cbdf78d4f6 - Sigstore transparency entry: 1246644671
- Sigstore integration time:
-
Permalink:
z3rone-org/native-fisher-py@5a5197e37958806582a45ada2aaa6c8acacd6ec7 -
Branch / Tag:
refs/tags/v0.2.4 - Owner: https://github.com/z3rone-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5a5197e37958806582a45ada2aaa6c8acacd6ec7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file native_fisher_py-0.2.4-cp39-abi3-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: native_fisher_py-0.2.4-cp39-abi3-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 5.4 MB
- Tags: CPython 3.9+, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ceab1b9bec8da97460a2548df84cc40f72dcefbf90b16fbdfde74eb12520dc8f
|
|
| MD5 |
c1fcd17411c61feb5d3e19802f5db98b
|
|
| BLAKE2b-256 |
f8940f28d2e068773d55c0027581582a17af8b54b2a4aba90117bce26690823d
|
Provenance
The following attestation bundles were made for native_fisher_py-0.2.4-cp39-abi3-manylinux_2_34_x86_64.whl:
Publisher:
release.yml on z3rone-org/native-fisher-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
native_fisher_py-0.2.4-cp39-abi3-manylinux_2_34_x86_64.whl -
Subject digest:
ceab1b9bec8da97460a2548df84cc40f72dcefbf90b16fbdfde74eb12520dc8f - Sigstore transparency entry: 1246644748
- Sigstore integration time:
-
Permalink:
z3rone-org/native-fisher-py@5a5197e37958806582a45ada2aaa6c8acacd6ec7 -
Branch / Tag:
refs/tags/v0.2.4 - Owner: https://github.com/z3rone-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5a5197e37958806582a45ada2aaa6c8acacd6ec7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file native_fisher_py-0.2.4-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.
File metadata
- Download URL: native_fisher_py-0.2.4-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
- Upload date:
- Size: 10.9 MB
- Tags: CPython 3.9+, macOS 10.12+ universal2 (ARM64, x86-64), macOS 10.12+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89856be07a75e96df15dc7767906e3aa57c76147b8a8710dcb32b7f13eb89175
|
|
| MD5 |
3fef3bc6727d0858c6340d920c24d73c
|
|
| BLAKE2b-256 |
7302a44ca2156b6150123a95877f3d427e0fbf94ed8f623aad1284af96589e6c
|
Provenance
The following attestation bundles were made for native_fisher_py-0.2.4-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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
native_fisher_py-0.2.4-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl -
Subject digest:
89856be07a75e96df15dc7767906e3aa57c76147b8a8710dcb32b7f13eb89175 - Sigstore transparency entry: 1246644713
- Sigstore integration time:
-
Permalink:
z3rone-org/native-fisher-py@5a5197e37958806582a45ada2aaa6c8acacd6ec7 -
Branch / Tag:
refs/tags/v0.2.4 - Owner: https://github.com/z3rone-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5a5197e37958806582a45ada2aaa6c8acacd6ec7 -
Trigger Event:
push
-
Statement type: