No project description provided
Project description
native-fisher-py
Why native-fisher-py?
native-fisher-py is a high-performance, drop-in replacement for the legacy fisher-py reader. While the original fisher-py relies on pythonnet and a local .NET runtime (which often fails in CI/CD or specialized Linux environments), native-fisher-py utilizes .NET NativeAOT and Rust to provide a self-contained, high-speed binary bridge.
Features
- Drop-in Replacement: Designed to match the
fisher_py.RawFileAPI for seamless migration. - Zero .NET Dependency: No local .NET runtime or
pythonnetrequired on the host machine. Everything is bundled. - Cross-Platform: Native binaries for macOS (ARM64/x64), Linux (x64), and Windows (x64).
- Turbo-charged Performance: Significantly faster metadata discovery and spectral extraction than the legacy Python bridge.
How it works
This project is a clean native bridge to the official Thermo Fisher libraries. It uses a three-layer architecture to provide cross-platform compatibility:
- Official DLLs: We use the original
.dllassemblies provided by Thermo Fisher Scientific. - C# NativeAOT Wrapper: A thin, compiled layer (
ThermoNativeReader) interfaces directly with the official DLLs and exports a simple C-compatible API. - Rust PyO3 Layer: A high-performance Rust bridge (
native-fisher-py) provides the Python bindings and handles memory safety and NumPy integration.
This approach ensures that we maintain binary-level parity with the official reader while providing a lightweight, 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 the old package:
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.0-cp39-cp39-win_amd64.whl.
File metadata
- Download URL: native_fisher_py-0.2.0-cp39-cp39-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 |
fc6041e98c1427fe3f4929723bd9333d0a849ae940715aff67fc6533ba257a63
|
|
| MD5 |
470a5374de50ef81e8546a038e8072da
|
|
| BLAKE2b-256 |
2aac5f32add6f1e76f84197a2cd62a0cef24a2dd41c0a217d3e31dfbfeed0955
|
Provenance
The following attestation bundles were made for native_fisher_py-0.2.0-cp39-cp39-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.0-cp39-cp39-win_amd64.whl -
Subject digest:
fc6041e98c1427fe3f4929723bd9333d0a849ae940715aff67fc6533ba257a63 - Sigstore transparency entry: 1246222429
- Sigstore integration time:
-
Permalink:
z3rone-org/native-fisher-py@dacf12c28302f6532c418ea4aa96fb686b38d9e3 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/z3rone-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@dacf12c28302f6532c418ea4aa96fb686b38d9e3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file native_fisher_py-0.2.0-cp39-cp39-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: native_fisher_py-0.2.0-cp39-cp39-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 |
eb3cff9870a7c47fd37ad73725e4ac979e7716e8b13dfba7f3438f9cd7e10f4f
|
|
| MD5 |
0c0a1936652c77672045fd2db976f3b8
|
|
| BLAKE2b-256 |
0b96a36d9db13c1e4fcbb772c61ea763ec3f51dd849746be206271bd66234866
|
Provenance
The following attestation bundles were made for native_fisher_py-0.2.0-cp39-cp39-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.0-cp39-cp39-manylinux_2_34_x86_64.whl -
Subject digest:
eb3cff9870a7c47fd37ad73725e4ac979e7716e8b13dfba7f3438f9cd7e10f4f - Sigstore transparency entry: 1246222431
- Sigstore integration time:
-
Permalink:
z3rone-org/native-fisher-py@dacf12c28302f6532c418ea4aa96fb686b38d9e3 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/z3rone-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@dacf12c28302f6532c418ea4aa96fb686b38d9e3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file native_fisher_py-0.2.0-cp39-cp39-macosx_11_0_arm64.whl.
File metadata
- Download URL: native_fisher_py-0.2.0-cp39-cp39-macosx_11_0_arm64.whl
- Upload date:
- Size: 5.3 MB
- Tags: CPython 3.9, 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 |
001c36f91ced0373d69e874d88176227d42c8138f1a4adc5fb6a44de8ec13d03
|
|
| MD5 |
e4403098cb5829d0f842b9ddad6dc5e8
|
|
| BLAKE2b-256 |
8caa9b504f319a3051292fb4766e4f790f01f2644756ac33aafed71ad6cbaef4
|
Provenance
The following attestation bundles were made for native_fisher_py-0.2.0-cp39-cp39-macosx_11_0_arm64.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.0-cp39-cp39-macosx_11_0_arm64.whl -
Subject digest:
001c36f91ced0373d69e874d88176227d42c8138f1a4adc5fb6a44de8ec13d03 - Sigstore transparency entry: 1246222437
- Sigstore integration time:
-
Permalink:
z3rone-org/native-fisher-py@dacf12c28302f6532c418ea4aa96fb686b38d9e3 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/z3rone-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@dacf12c28302f6532c418ea4aa96fb686b38d9e3 -
Trigger Event:
push
-
Statement type: