Git Product home page Git Product logo

file_sync's Introduction

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>}

file_sync's People

Contributors

girishsv1986 avatar

file_sync's Issues

Valid Token failed

I did get token by running server
http://0.0.0.0:8080/file
{
"created": "2019-01-29T09:55:32.828243+00:00",
"file_name": "first_file",
"token": "UznuFZEuHl",
"user_name": "ashish"
}

----------FILE OPERATIONS MENU----------

  1. File operations
  2. Exit
    Enter your choice: 1
    Enter file token: UznuFZEuHl
    Validating file token ...

Invalid file token.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.