No project description provided
Project description
rblx-open-cloud
Python API wrapper for Roblox Open Cloud.
Quickstart
Generating an API key and Preparing the library
- Create an API key from the Creator Dashboard. Read Managing API Keys if you need help.
- Copy the code in
rblx-open-cloud.py
, paste it in a new file and save it in the same directory as your project. - Add the following lines to your code and replace
api-key-from-step-1
with the key you generated in step 1. Tip you should add your api key to an enviroment variable.import rblx_opencloud rblx_opencloud.api_key = "api-key-from-step-1"
If you want to start by accessing your game's data stores go to Data Stores otherwise, you can go to Place Publishing.
note: Roblox doesn't support access to ordered data stores via open cloud, yet.
Publish or Save a .rbxl
File
import rblx_opencloud
rblx_opencloud.api_key = "api-key-from-step-1"
#create a PlacePublishing object with your universe
PlacePublishing = rblx_opencloud.PlacePublishing(universe="universe-id-here")
#opens the .rbxl file as 'rb' and saves it to the place
with open("path-to/place-file.rbxl", "rb") as file:
version = PlacePublishing.savePlace("place-id-here", file)
#opens the .rbxl file as 'rb' and publishes it to the place
with open("path-to/place-file.rbxl", "rb") as file:
version = PlacePublishing.publishPlace("place-id-here", file)
Accessing Data Stores
If you don't know how to get the universe or place ID read Publishing Places with API Keys
import rblx_opencloud
rblx_opencloud.api_key = "api-key-from-step-1"
# create a DataStoreService object with your universe ID
DataStoreService = rblx_opencloud.DataStoreService(universe="universe-id-here")
# get your data store, scope is default to global
DataStore = DataStoreService.getDataStore("data-store-name", scope="global")
# gets the value and info (user ids, metadata, created, etc.)
value, info = DataStore.get("key-name")
# sets the value of the key and assigns the user ids list to 287113233
DataStore.set("key-name", "value", users=[287113233])
# deletes the key now.
DataStore.remove("key-name")
Publishing To Message Service
If you don't know how to get the universe or place ID read Publishing Places with API Keys
import rblx_opencloud
rblx_opencloud.api_key = "api-key-from-step-1"
# create a MessagingService object with your universe ID
MessagingService = rblx_opencloud.MessagingService(3499447036)
#publish a message to the topic 'topic69420'. Roblox Studio won't recieve this message, only live game servers.
MessagingService.publish("topic69420", "message")
check out the wiki for documentation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rblx-open-cloud-0.0.4.tar.gz
(5.3 kB
view hashes)