You can run the async code by importing Client from upstash_qstash.asyncio and awaiting the methods.
Client
upstash_qstash.asyncio
from upstash_qstash import Client client = Client("<QSTASH_TOKEN>") keys = client.keys() both_keys = keys.get() print(both_keys["current"], both_keys["next"])
from upstash_qstash import Client client = Client("<QSTASH_TOKEN>") keys = client.keys() new_keys = keys.rotate() print(new_keys["current"], new_keys["next"])
Was this page helpful?