This is a demo for transferring files over grpc
Features
- File upload implemented using client streaming
- File chunking to configurable size (default: 1MB)
- File information passed as part of stream, including:
- name of the file
- who uploaded the file
- file checksum
- File checksum is compared by server to ensure file integrity
Possible future features
- Asynchronous client response handler
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
Server side:
python server.py
Client side:
python client.py