Skip to content

egorman-sray/grpc-file-transfer

 
 

Repository files navigation

GRPC File Transfer

This is a demo for transferring files over grpc

Features

  1. File upload implemented using client streaming
  2. File chunking to configurable size (default: 1MB)
  3. File information passed as part of stream, including:
    1. name of the file
    2. who uploaded the file
    3. file checksum
  4. File checksum is compared by server to ensure file integrity

Possible future features

  1. Asynchronous client response handler

Installation

Create an environment:

python -m venv .env
source .env/bin/activate

Install packages:

python -m pip install -r requirements.txt

To generate protos:

python -m grpc_tools.protoc -I. --python_out=. --grpc_python_out=. file_transfer.proto

Usage

Server side:

python server.py

Client side:

python client.py

About

Handy tool for file transfer using Python gRPC

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%