I'm a programming novice, I need this architecture for some reason, but when I do, this method is not feasible, can someone provide some, alternative methods for me to learn? I want to run both asynchronous methods and generic methods
import json
import time
import random
import asyncio
async def post_data():
Yaw=round(random.uniform(-1,1),2)
print(Yaw)
time.sleep(1)
asyncio.run(post_data)
def other_things():
print("COOL")
if __name__ == '__main__':
while True:
post_data()
other_things()
I have try this way, but the structure I really needed had to use asynchronous methods, so it didn't help me.
import json
import time
import random
import asyncio
def post_data():
Yaw=round(random.uniform(-1,1),2)
print(Yaw)
time.sleep(1)
def other_things():
print("COOL")
if __name__ == '__main__':
while True:
post_data()
other_things()