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.1.tar.gz (19.6 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.1-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fastflight-0.2.1.tar.gz
  • Upload date:
  • Size: 19.6 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.1.tar.gz
Algorithm Hash digest
SHA256 e37a942079bddbe1290962c7a494b7ced77c3f04c615964b4dfb319bd85fa08b
MD5 147c1eace1142b3e02da3bcca682f94c
BLAKE2b-256 c2224a8ece4f525c4f6bb411d84f5fa622943af52c28431c893064fc19128f48

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fastflight-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 17.8 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7a568ef57eb42bc3cedb6afb568ca44cd7a94d9530d57b8e044974c85e1df011
MD5 6e71768eb0e3d1b8f1c98498970661cf
BLAKE2b-256 96cc98308c8f83969df3be0e92378fe8c74ac8fa09dde5592721185c35b71bdc

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