GithubHelp home page GithubHelp logo

nihalrai / assignment Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 3 KB

Create REST api endpoints to manage a backend process by stopping and resuming it through api requests.

Dockerfile 4.25% Python 95.75%

assignment's Introduction

Atlan Backend Internship Task

TODO

  • Multiprocess adding and halting.
  • Add OOPs structure in it.
  • Implement the pause and resume api endpoints with dashboard.
  • Add extra template for Upload page and refresh page.

REST API endpoints to manage a process

  • Stop a process
  • Resume a process

Introduction

  It defines endpoints for managing a baseline upload behavior. In this the process can be halted, restarted.

Approach

  After uploading a file and starting the process, the upload request if successful should return the process id
  of the task. If user want to stop the process should send the stop request using the process id. If user want to   
  resume the process after stopping it, will send request to resume api endpoint.

Requirements

  • Python 3.5+
  • Flask

To run

  • Build the docker image using docker and then run it.
  docker build -t Assignment:latest
  docker run --name App -v$PWD/app:/app -p5000:5000 Assignment:latest

  • Test the upload endpoint
  curl -F file=@C:\Users\nkthe\Downloads\UPES.png http://127.0.0.1:5000/api/upload
  curl  http://127.0.0.1:5000/api/resume?pid=HASH (SAMPLE REQUEST)

TODO

  • Implement a status endpoint to show running task of particular user.
  • Test all scripts using unittest module.
  • Map the process id of each upload task using a hash function.

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.