Skip to content

girishsv1986/file_sync

Repository files navigation

file_sync

Assumptions

  1. Only single client/daemon will upload/sync file content
  2. Parallel file content update/sync for the same file, may not work perfectly or can change the order of file contents
  3. Application user has write permission to create/write files.

To Run -

  1. Create a virtual environment and install the required dependencies from requirement.txt
  2. To run web server from terminal - python run.py
  3. Make sure APPLICATION_HOST constant value is updated with web server host name/ip in interactive_daemon.py
  4. To run interactive file daemon - python interactive_daemon.py

-- Use /file POST api to create new file entry to be sync on server with payload {"file_name": <file_name>, "user_name": <user_name>} -- Use /files GET api to get list of all files info including their token -- Use /file/content/ GET api to get file content for given token -- Use /file/content/ PATCH api to get sync file content for given token with payload {"contents": <content_to_sync>}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages