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.
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:
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.
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.
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
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.
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).