Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def get_req(url):
with yaspin(Spinners.arc, text="Loading", color="magenta", side="right", reversal=True) as sp:
res = requests.get(url)
comm = json.loads(res.text)
if comm['status'] != 'OK':
print(comm['comment'])
sys.exit(1)
return res
def manual_setup():
swirl = yaspin(text="Default spinner")
swirl.start()
time.sleep(2)
swirl.spinner = Spinners.arc
swirl.text = "Right arc spinner"
swirl.color = "yellow"
swirl.right = True
time.sleep(3)
swirl.text = "Resersed arc spinner"
swirl.reverse = True
time.sleep(3)
swirl.stop()