Skip to main content

No project description provided

Project description

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.RawFile API for seamless migration.
  • Zero .NET Dependency: No local .NET runtime or pythonnet required 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.
  • High Precision: Verified 100% numerical parity for spectra, chromatograms, and metadata.

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 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

License

This project is licensed under the MIT License. The underlying Thermo Fisher RawFileReader libraries remain subject to their original license (see vendor/RawFileReader/License.doc).

Credits

RawFileReader reading tool. Copyright © 2016 by Thermo Fisher Scientific, Inc. All rights reserved.

Project details


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.1.0-cp39-cp39-win_amd64.whl (3.9 MB view details)

Uploaded CPython 3.9Windows x86-64

native_fisher_py-0.1.0-cp39-cp39-manylinux_2_34_x86_64.whl (4.3 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.34+ x86-64

native_fisher_py-0.1.0-cp39-cp39-macosx_11_0_arm64.whl (4.2 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

Details for the file native_fisher_py-0.1.0-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for native_fisher_py-0.1.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 bf77fd0aa2e3cdd47caa5db8b9dbed0e6632071e37ca7d05f36f4bc9a650fe8f
MD5 502d1429c4e628897f29df5d0194b57a
BLAKE2b-256 8e60f9692593169d5a106a120d568d36e410fbca3363da7949d062a944fbffcc

See more details on using hashes here.

Provenance

The following attestation bundles were made for native_fisher_py-0.1.0-cp39-cp39-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.1.0-cp39-cp39-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for native_fisher_py-0.1.0-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 931a051c15820f16136520c7759d87093476213b22fec072dd901941dfcfc862
MD5 76e9ed40ba53e89821dd4b47e0072877
BLAKE2b-256 6b3383b6e61f56bf484995e9ebdde0ca09e5c1648283d2e23097ba8fe36a5c86

See more details on using hashes here.

Provenance

The following attestation bundles were made for native_fisher_py-0.1.0-cp39-cp39-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.1.0-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for native_fisher_py-0.1.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 667a804689f33283f2d7d23577ffbd59fe4e771ad8f84c21e82103ee9409d8db
MD5 f309edcd028eba3e31f5c82f73cf9659
BLAKE2b-256 2aee8dd12a8209cc0dd66473968821c688859dc38afd563c08dd13390e4f86b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for native_fisher_py-0.1.0-cp39-cp39-macosx_11_0_arm64.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.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page