Skip to content

Asynchronous

Alpha Library

The asynchronous version of the library is currently in Alpha. If you find any issues with it please report it in the annoucement's thread in the Discord server, or on the GitHub issue tracker.

Additionally, avoid using the rblxopencloud.preform_request method, as it's likely it's name will be changed.

If you're using rblx-open-cloud in an asynchronous context, such as with discord.py, interactions.py, or ro.py, then it could be beneficial to use the aynchronous version of the library.

Installing the Alpha Version

You can install the alpha version with the following command:

pip install git+https://github.com/treeben77/rblx-open-cloud.git@async --force

Importing the Library

When installing the library, it will install both the rblxopencloud, and rblxopencloudasync modules. The regular rblxopencloud library will still work as normal. rblxopencloudasync is the asyncronous version. For example, here is a comparison between importing the two versions:

import rblxopencloud
import rblxopencloudasync

Syntax Differences

All classes, methods, and attributes still persist the same values/returns, so you can still use the library reference. The difference is all methods that call to the Roblox API need to be awaited. For example, Experience.get_data_store does not need to be awaited, but Experience.publish_message does. Here is an example of the differences between the two libraries for fetching a key, and listing it's versions:

from rblxopencloud import Experience

experience = Experience(0000000000, "api-key")

datastore = experience.get_data_store("playerData")

value, info = datastore.get("287113233")
print(value, info)

for version in datastore.list_versions("287113233"):
    print(version)
from rblxopencloudasync import Experience

experience = Experience(0000000000, "api-key")

datastore = experience.get_data_store("playerData")

value, info = await datastore.get("287113233")
print(value, info)

async for version in datastore.list_versions("287113233"):
    print(version)