Skip to main content

FastAPI and Arrow Flight integrated server offering efficient dual-protocol support for both REST and gRPC data streaming.

Project description

FastFlight

FastAPI + Arrow Flight Server

Introduction

This project integrates a FastAPI server with an embedded Arrow Flight server, offering a dual-protocol solution for handling both HTTP REST and gRPC requests efficiently.

  • FastAPI Server: Provides a robust and high-performance HTTP REST service.
  • Arrow Flight Server: Embedded within the FastAPI application, it directly handles gRPC requests, enabling fast and scalable data retrieval.
  • REST to Flight Integration: A specialized REST endpoint forwards data requests to the Arrow Flight server, streaming the data back to the client seamlessly.

How does it work?

With FastAPI

  1. Run the flight server and the FastAPI server in separate processes
  2. Test by posting query params to the /fastflight/ endpoint

Without FastAPI

  1. RUn the flight server
  2. Test by posting flight ticket to the flight server endpoint.
  3. Or, use the flight_client to help with the data retrieval.

How to add a new data source type?

  1. Add a new data source type to the enum in models/data_source
  2. Add a new params class in models/params. Make sure the new params class is registered with the new data source type
  3. Add a new data service to handle the new params

Better logging

See src/fastflight/utils/custom_logging.py

Development Settings

  1. Create a venv
  2. pip install -r requirements.txt
  3. uvicorn fastflight.main:app --reload --app-dir src

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.2.0.tar.gz (19.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.2.0-py3-none-any.whl (17.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fastflight-0.2.0.tar.gz
  • Upload date:
  • Size: 19.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for fastflight-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e5ab71085ae90c58cb9bfaeb3b2ec298b664977d9f2df6dfd1fdfc10579b5160
MD5 fefcbe3d1c210d3d63393c9129d96c6f
BLAKE2b-256 cb4270b6b99265e999258afe5b06817ff34e6bed093fac7269dc5f531381bdcf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fastflight-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 17.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for fastflight-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 81dda8781aad05d63a7b962fa80113cec6dd3a95a93a0fde8a60e25188b3a740
MD5 879aee1c07a669e91897c13f92ac2027
BLAKE2b-256 5e4b17d3dfddd1ad5b2c80676ae372f12d03261b6bcf7874287a35d47d87f7a0

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