Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

Numpy with Apache Arrow Flight

PyPI version License: MIT CI Coverage Status CodeFactor Created with qCradle Renovate enabled

A Problem

We provide

  • An abstract base class for an Apache flight server
  • A client class to communicate with such servers

The client provides a simple interface for sending NumPy arrays, performing computations, and retrieving results, all while handling the serialization and deserialization automatically in the background using Apache Arrow.

To create a server we expect the user to overload a function performing the calcutation based on a dictionary of numpy arrays.

Features

  • Seamless conversion between NumPy arrays and Arrow Tables
  • Simple interface for data transfer operations
  • Type-safe operations with proper error handling

Installation

You can install this client via

pip install numpy-flight

Usage

Basic Setup

We introduce the Baseclass 'Server':

>>> from flight import Server

>>> class TestServer(Server):
...     def f(self, matrices):
...          self.logger.info(f"{matrices.keys()}")
...          # Simple implementation for testing - just return the input
...          return {key : 2*value for key, value in matrices.items()}

All complexity is hidden in the class 'Server' which is itself a child of the pyarrrow's FlightServerBase class. It is enough to implement the method 'f' which is expecting a dictionary of numpy arrays. It will also return a dictionary of numpy arrays.

The server can be started locally with

>>> server = TestServer.start(host="127.0.0.1", port=5555)

While the server is running we can use a Python client for computations

>>> import numpy as np
>>> from flight import Client

>>> with Client(location="grpc://127.0.0.1:5555") as client:
...     output = client.compute(command="compute", data={"input": np.array([1,2,3])})

>>> print(output["input"])
[2 4 6]

Clients for other languages are thinkable. We shut the server down with

server.shutdown()

Metadata

Release files for numpy-flight 0.0.16

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for numpy-flight 0.0.16
File Size Uploaded
numpy_flight-0.0.16.tar.gz 7.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for numpy-flight 0.0.16
File Interpreter ABI Platform
numpy_flight-0.0.16-py3-none-any.whl Python 3 none any Details

Total release size: 17.3 kB

Release files / numpy_flight-0.0.16.tar.gz

Download URL numpy_flight-0.0.16.tar.gz
Size 7.8 kB
Tags Source
SHA-256 checksum
How to use checksums
416db61dc8f3c9c03b4298e49954d386fffce13fc3366ccd916c44cc0974c5dd
BLAKE2b-256 checksum
How to use checksums
ff271a12a96603c71e86c1076ad38b39587a0416a9f833a044ea683da399f775
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2025.

Transparency log

Release files / numpy_flight-0.0.16-py3-none-any.whl

Download URL numpy_flight-0.0.16-py3-none-any.whl
Size 9.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c2526d75a520ad9a05d11cdd9b03e93c5e534ff8364cc3522da0bbdf256f12e6
BLAKE2b-256 checksum
How to use checksums
ff040783435e1c8a540242ee6d61801160a47225bca56c7578c8bc2745e4d5ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2025.

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