def CRD(): details = [ "Name", "Age", "Languages known", "Preferred Role", "Years Of Experience" ] print( " To Create Event Enter : 1 \n To Read Event Enter 2\n To Delete Event enter : 3" ) n = int(input()) #getting desired input from user if (n == 1): content = {} filename = input("Enter file name") if len(filename) <= 32: content = {i: input("enter {}".format(i)) for i in details} #storing content in dictionary print(content) else: print("Error : Enter Valid Key name") print("Enter Time of Expiry for the file (in seconds)") timeofexpiry = int(input()) b.create(filename, content, timeofexpiry) if (n == 2): filename = input("Enter File Name") b.read(filename) if (n == 4): filename = input("Enetr File name") b.delete(filename)
import threading from threading import * import time import backendcode as x x.create("sastra", 25) x.create("src", 71, 2100) x.read("sastra") x.read("src") x.create("sastra", 50) x.modify("sastra", 55) x.delete("sastra") key_name = input() value = int(input()) timeout = int(input()) t1 = threading.Thread(target=(x.create or x.read or x.delete), args=(key_name, value, timeout)) t1.start() t1.join() key_name = input() value = int(input()) timeout = int(input()) t2 = threading.Thread(target=(x.create or x.read or x.delete), args=(key_name, value, timeout)) t2.start()
import threading from threading import * import time import backendcode as x x.create("sastra", 25) x.create("main", 70, 3800) x.read("sastra") x.read("main") x.create("sastra", 150) x.modify("sastra", 550) x.delete("sastra") key_name = input() value = int(input()) timeout = int(input()) t1 = threading.Thread(target=(x.create or x.read or x.delete), args=(key_name, value, timeout)) t1.start() t1.join() key_name = input() value = int(input()) timeout = int(input()) t2 = threading.Thread(target=(x.create or x.read or x.delete), args=(key_name, value, timeout))