Rblx-open-cloud - Roblox Open Cloud Wrapper for Python!

the same way you would with other data, for example data saved like this:

datastore = Experience.get_data_store("example-store")
datastore.set("key-value", {"exmaple": "data", "yes": True}, users=[1234])

would be accessible in studio like this:

local datastore = DataStoreService:GetDataStore("example-store")
value = datastore:GetAsync("key-value")
print(value)
>>> {["example"] = "data", ["yes"] = true}

I hope this helps!

1 Like

Ahhhh I just figured this out last night

the problem is that it gave me an instance so I had to use GetMetaData()

thank you

1 Like

Edit: How would I remove something from the meta-data?

1 Like

you can remove a metadata key in Python like this:

value, info = DataStore.get("example-key")

metadata = info.metadata

if metadata.get("key-to-remove"):
    del metadata["key-to-remove"]

DataStore.set("example-key", value, users=info.users, metadata=metadata)

this example would get the entry, check if the metadata key is there, remove it and then save the key. you can modify metadata howeveer you want, as if it was a dictionary.

2 Likes

v1.4.0 - Webhooks & Docstrings

Webhooks

The library now supports incoming webhooks. It has been quite a bit since the feature was released, but I wanted to get it correct. Read the documentation here: Webhook — rblx-open-cloud 1.4 documentation

OAuth2

  • Added PKCE Support for OAuth2.
    • OAuth2App.generate_code_verifier has been added, which generates a PKCE key.
    • OAuth2App.generate_uri now has a code_verifier parameter which takes in a PKCE key. This key must be saved and should be unique for each user.
    • OAuth2App.exchange_code now has a code_verifier parameter which takes in the same PKCE key that was provided to OAuth2App.generate_uri for the user.

Docstrings

Each class and method in the library now has it’s own docstring. They contain a description of what the method/class does, and the parameters it takes in. These should work in most IDEs, including VS Code.

User-Agent

Very technical change that shouldn’t effect users, but all requests made by the library now use it’s own user agent, instead of the Python requests default. This is it:

rblx-open-cloud/1.4.0 (https://github.com/treeben77/rblx-open-cloud)

If for whatever reason you’d like to change it, you can set a new one changing the value of rblxopencloud.user_agent.


GitHub Release: Release v1.4.0 - Webhooks & Docstrings · treeben77/rblx-open-cloud · GitHub
Upgrading with pip:

pip install rblx-open-cloud --upgrade
1 Like

v1.5.0 - Request Sessions & OAuth2 Headshort URI

OAuth2 Headshot URI

A new OAuth2 claim for the headshot URI was just announced. When authorizing OAuth2 with the profile scope, it can be accessed using AccessToken.user.headshot_uri.

Requests Sessions

All HTTP requests to Roblox in the library now use a request session object, which makes requests slightly faster.

Bug Fixes

  • Fixed a bug which would make OAuth2 not work if both jwt and PyJWT were installed.

GitHub Release: Release v1.5.0 - Request Sessions & OAuth2 Headshort URI · treeben77/rblx-open-cloud · GitHub
Upgrading with pip:

pip install rblx-open-cloud --upgrade
1 Like

Just want to leave my review here, instead of posting it to every single category. Great library, maintainer takes feedback very well, and see what he can do to implement your suggestion. I use it for my internal systems, and it’s amazing.

2 Likes

v1.6.0 - Inventory & Read Groups API

Inventory API

The inventory API has been added, view the docs: User — rblx-open-cloud 1.6 documentation

Groups API

The read part of the groups API has been added, view the docs: Group — rblx-open-cloud 1.6 documentation


GitHub Release: Release v1.6.0 - Inventory & Read Groups API · treeben77/rblx-open-cloud · GitHub

Upgrading with pip:

pip install rblx-open-cloud --upgrade
1 Like

OMG this is an absolute LIFE SAVER thank you so much

you’re welcome! if you have any problems/questions, feel free to ask them here!

1 Like

Documentation Update

Treeben7 & myself have been working on new documentation for rblx-open-cloud, and it’s finally finished! Check it out at here in the README.md section.

Asynchronous Module Alpha

Treeben7 has created a secondary version of rblxopencloud for async use. It is useful if you’re using a library such as discord.py. You can check documentation out here

Documentation: rblx-open-cloud
Github Release: GitHub - treeben77/rblx-open-cloud: API Wrapper for Roblox Open Cloud in Python

2 Likes

Can you please let me know how to return the asset ID of a published asset.

The Asset class has a attribute called id which will be the uploaded asset’s ID. Here’s is an example uploading a file, and then ensuring the file is not pending then getting it’s asset ID:

with open('path-to/file.png', 'rb') as file:
    creator.upload_asset(file, AssetType.Decal, "Asset Name", "This is the description")

if not isinstance(asset, rblxopencloud.Asset):
    while True:
        status = asset.fetch_status()
        if status: 
            asset = status
            break

print(asset.id)

You can learn more about Creator.upload_asset on the documentation.

Thanks for the quick response! GOing to try this out as I was receiving UUID instead of numerical form outside of this API wrapper.

Great work! Going to utilize this for a notifications project I’ve been working on.

1 Like

Any chance that https://apis.roblox.com/assets/v1/assets/{assetId} could be added the API here? Been needing to retrieve asset metadata via the API. Thanks for considering!

It’s available in the V2 beta of the library. I’m working on getting V2 out soon and will make a page on migrating to it eventually.

the V2 docs: Creator - rblx-open-cloud

installing V2:

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

v2.0.0 - Version 2

Version 2 is finally here! Now with many new library features, including:

If you do not wish to migrate to v2 to avoid breaking changes, use the following import:

pip install rblx-open-cloud==1.6.0

Thanks to @Bulldo344, @ignaigna on GitHub and @treeben77


GitHub Release: Release v2.0.0 - Version 2 of rblx-open-cloud! · treeben77/rblx-open-cloud · GitHub
Upgrading with pip:

pip install rblx-open-cloud~=2.0
2 Likes

v2.1.0 - Update Group Members

This is in response to Introducing Roblox Communities


GitHub Release: Release v2.1.0 - Update Group Member · treeben77/rblx-open-cloud · GitHub
Upgrading with pip:

pip install rblx-open-cloud~=2.1
1 Like

Hi! I was having an issue using the group.fetch_member() function.

I validated the group with the correct ID and API key, and used print statements & checked the API key manually and it was valid. The API key has read and write permissions.

For some reason, it kept giving me an Unauthorized Access error whenever I tried to use that function (used a try error command to print out the error message).

Any help would be appreciated, thank you!