Skip to main content

FastFlight is a high-performance data transfer framework that integrates Apache Arrow Flight to fetch and stream large-scale data from multiple sources, using a modular, pluggable architecture for various data services, and offers optional FastAPI integration for HTTP-based access.

Project description

FastFlight 🚀

FastFlight is a framework built on Apache Arrow Flight, designed to simplify high-performance data transfers while improving usability, integration, and developer experience.

It addresses common challenges with native Arrow Flight, such as opaque request formats, debugging difficulties, complex async management, and REST API incompatibility. FastFlight makes it easier to adopt Arrow Flight in existing systems.

✨ Key Advantages

Typed Param Classes – All data requests are defined via structured, type-safe parameter classes. Easy to debug and validate.
Service Binding via param_type – Clean and explicit mapping from param class → data service. Enables dynamic routing and REST support.
Async & Streaming Readyasync for support with non-blocking batch readers. Ideal for high-throughput systems.
REST + Arrow Flight – Use FastAPI to expose Arrow Flight services as standard REST endpoints (e.g., /stream).
Plug-and-Play Data Sources – Includes a DuckDB demo example to help you get started quickly—extending to other sources (SQL, CSV, etc.) is straightforward.
Built-in Registry & Validation – Automatic binding discovery and safety checks. Fail early if service is missing.
Pandas / PyArrow Friendly – Streamlined APIs for transforming results into pandas DataFrame or Arrow Table.
CLI-First – Unified command line to launch, test, and inspect services.

FastFlight is ideal for high-throughput data systems, real-time querying, log analysis, and financial applications.


🚀 Quick Start

1️⃣ Install FastFlight

pip install "fastflight[all]"

or use uv

uv add "fastflight[all]"

🎯 Using the CLI

FastFlight provides a command-line interface (CLI) for easy management of Arrow Flight and FastAPI servers.

Start the FastFlight Server

fastflight start-fast-flight-server --location grpc://0.0.0.0:8815

Options:

  • --location (optional): gRPC server address (default: grpc://0.0.0.0:8815).

Start the FastAPI Server

fastflight start-fastapi --host 0.0.0.0 --port 8000 --fast-flight-route-prefix /fastflight --flight-location grpc://0.0.0.0:8815

Options:

  • --host (optional): FastAPI server host (default: 0.0.0.0).
  • --port (optional): FastAPI server port (default: 8000).
  • --fast-flight-route-prefix (optional): API route prefix (default: /fastflight).
  • --flight-location (optional): Arrow Flight server address (default: grpc://0.0.0.0:8815).
  • --module_paths (optional): Comma-separated list of module paths to scan for custom data parameter and service
  • classes (default: fastflight.demo_services).

Note: When using the /stream REST endpoint to stream data, make sure the param_type field is embedded in the request body. It's critical for the server to route the request to the correct data service. For example, for the default demo services, the param_type should be fastflight.demo_services.duckdb_demo.DuckDBParams.


Start Both FastFlight and FastAPI Servers

fastflight start-all --api-host 0.0.0.0 --api-port 8000 --fast-flight-route-prefix /fastflight --flight-location grpc://0.0.0.0:8815 --module-paths fastflight.demo_services.duckdb_demo

This launches both gRPC and REST servers, allowing you to use REST APIs while streaming data via Arrow Flight.


📖 Additional Documentation


🛠 Future Plans

Structured Ticket System (Completed)
Async & Streaming Support (Completed)
REST API Adapter (Completed)
CLI Support (Completed)
🔄 Support for More Data Sources (SQL, NoSQL, Kafka) (In Progress)
🔄 Enhanced Debugging & Logging Tools (In Progress)

Contributions are welcome! If you have suggestions or improvements, feel free to submit an Issue or PR. 🚀


📜 License

This project is licensed under the MIT License.


🚀 Ready to accelerate your data transfers? Get started today!

Project details


Download files

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

Source Distribution

fastflight-0.4.0.tar.gz (114.0 kB view details)

Uploaded Source

Built Distribution

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

fastflight-0.4.0-py3-none-any.whl (29.1 kB view details)

Uploaded Python 3

File details

Details for the file fastflight-0.4.0.tar.gz.

File metadata

  • Download URL: fastflight-0.4.0.tar.gz
  • Upload date:
  • Size: 114.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.22

File hashes

Hashes for fastflight-0.4.0.tar.gz
Algorithm Hash digest
SHA256 d36177a37e71ca305f4551fde2032c0f5cc0c36c0386e6a864b00cb196437476
MD5 384b6853359f2dd098dedb2f9b18866a
BLAKE2b-256 01d0375f937ce1c0905ee30a7e920f6bd15872a19fcffc4ace39824368cce22f

See more details on using hashes here.

File details

Details for the file fastflight-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: fastflight-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 29.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.22

File hashes

Hashes for fastflight-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7fd85028954b084e354bd6100fcd343e6ddb9d58d1aa5b6c770478cba38a698f
MD5 e398ddccc004fe5cc0d92862f5ce8e44
BLAKE2b-256 933771da85e2dd02200eeb0b78b35e221cb96b818d90a1f82551802a9048b320

See more details on using hashes here.

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