Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

gRPC File Sync Service

A simple gRPC-based service for uploading, deleting, and renaming files, with automatic synchronization similar to Dropbox.

Features

  • Upload: Upload files to the server.
  • Delete: Delete files from the server.
  • Rename: Rename files on the server.
  • Auto-Sync: Automatically sync files between client and server.

Prerequisites

  • Python 3.6+
  • pip package manager

Installation

  1. Clone the Repo:

    git clone https://github.com/<your-username>/gRPCFileSync.git
    cd gRPCFileSync
  2. Set Up Virtual Environment (Optional):

    python -m venv venv
    source venv/bin/activate  # On Windows use `venv\Scripts\activate`
  3. Install Dependencies:

    pip install -r requirements.txt
  4. Generate gRPC Code:

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

Usage

Run the Server

  1. Create Upload Folder:

    mkdir -p uploads
  2. Start Server:

    python file_server.py

Run the Client

  1. Create Sync Folder:

    mkdir -p sync_folder
  2. Start Client:

    python file_client.py

File Operations

  • Upload: Add a file to sync_folder.
  • Delete: Remove a file from sync_folder.
  • Rename: Rename a file in sync_folder.

Stopping

  • Server: Press Ctrl + C in the terminal.
  • Client: Press Ctrl + C in the terminal.

Project Structure

gRPCFileSync/
├── file_client.py
├── file_server.py
├── file_service.proto
├── requirements.txt
├── uploads/
└── sync_folder/

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages