Is there anyway to clear datastore.list_versions("some random key")
Because it seems once I remove a key my API seems to still see the key as if it still exists.
Code
Entrys: int = 0
for Entry in NEX_Datastore.list_keys():
Entrys += 1
print('Total Entrys: ',Entrys)
This is my current solution
Entrys: int = 0
for _ in NEX_Datastore.list_keys():
try:
NEX_Datastore.get(_.key)
Entrys += 1
except (rblxopencloud.NotFound):
continue
print(Entrys)
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