Skip to content

ManudattaG/SC_Assignment_REST_Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 

Repository files navigation

RSA - Routine Service Application

Overview:

This application creates a new service routine by calculating every step time count with start value for each service. Application also has several features like to clear the service timer and set the status accordingly, pause the service and modify the time as well as rendering feature to fetch all the service details in an HTML page.

Overview of Workflows:

  1. Create a new service

    • Creates a new service routine with an unique identifier
    • Starts calculating every step time seconds depending on start value
  2. Check service with service id passed

    • Retrieves the service details by matching service id passed by the user
  3. Check service without the service id

    • Retrieves all the service details present in the system
  4. Render service in HTML page

    • Retrieves all the service details from the database and displays as HTML page
  5. Clear the service

    • Sets the service timer to 0 and sets the status to "Stopped" in database
  6. Pause the service

    • Pauses a given service and modifies the time in database to reflect the API response

Project Structure:

  1. create.py -- Creates a new service routine with an unique identifier, Starts calculating every step time seconds depending on start value
  2. check.py -- Retrieves the service details by matching service id passed by the user else returns all the services in the system
  3. render.py -- Retrieves all the service details from the database and displays as HTML page
  4. clear.py -- Sets the service timer to 0 and sets the status to "Stopped" in database
  5. pause.py -- Pauses a given service and modifies the time in database to reflect the API response

Pre requisites:

  • Python 3.x
  • AWS Lambda
  • Amazon API Gateway
  • Amazon DynamoDB

REST API endpoints:

  1. create -- https://(hostname).execute-api..amazonaws.com/dev/create (POST)
  2. check -- https://(hostname).execute-api..amazonaws.com/dev/check?id=<routine_id> (GET)
  3. clear -- https://(hostname).execute-api..amazonaws.com/dev/clear?id=<routine_id> (POST)
  4. pause -- https://(hostname).execute-api..amazonaws.com/dev/pause?id=<routine_id> (POST)
  5. render -- https://(hostname).execute-api..amazonaws.com/dev/render (GET)

DynamoDB table structure:

  • Table Name - Routine_Service
  • Primary Key - routine_id
  • Attributes - stepTimeCount, startval, steptime, creation_time, service_status, modifiedAt

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages