PythonPublisher | Update Games Automatically at Scheduled Time with Python!

PythonPublisher


GitHub Repository
Current Version: v2.0.0 Jump To Latest Update

About

This is a Web Panel made with Python that allows you to schedule the publish at a specific time, replace servers, and optionally restart servers if you provide a Roblox cookie.

Screenshots



How does it work?

This script runs in a loop, checking for scheduled updates to run. It then uses the Roblox Open Cloud API to save/publish your place. If you have specified a .ROBLOSECURITY token, it will use it to shutdown server or migrate to latest version (shouldReplaceServers)

How do you get a Open Cloud API Key?

  1. Go to Credentials | Creator Dashboard.
  2. Select a Creator/Group you want to publish your game in.
    image
  3. Click Create API Key
    image
  4. Name your API Key
  5. Select The Place Publishing API
  6. Click Add API System and Add your Experience.
  7. Give it Write Permissions
  8. Optionally Give it access to Messaging Service API too, for publishing messages to MessagingService when the game updates.
  9. Add IP Address 0.0.0.0/0 to allow all IP Addresses to use this key.
  10. Lastly, click Save & Generate Key
    image
  11. Copy the key and you’re done! :tada:
Deploy on Railway.App

You will get 500 hours (20 days) of free execution time

  1. Go to the GitHub Repository
  2. Download ZIP.
    image
  3. Create a new Private Repositories here.
  4. Unzip it and upload all the files
    image
  5. Replace place.rbxl with your place file.
  6. Register an account on Railway.App.
  7. Create a new project on Railway here.
  8. Click Deploy from GitHub Repo
    image
  9. Login and select your Repository
  10. Click Add Variables
    image
  11. Set variables adminPassword, robloxCookie, openCloudApiKey to your desired values.
  12. You’re set!
Inspired By

Schedule publishing of games, assets and descriptions
How to Automate Place Publishing with Partially Managed Rojo

Would you use this?
  • Yes
  • No
  • Maybe

0 voters

Rate this Resource
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10

0 voters

This is my first open-source resource.
Feedbacks are welcome!

22 Likes

This would be useful if roblox pushed your game out when it got an update but it is the opposite unfortunately.

4 Likes

Maybe add arguments to the python script by using

sys.argv[2] # Argument 1 would be "python" and argument 2 would be the script name because that's how you run it

in the code


So you can run the script in the terminal like this

python main.py ./place.rblx

By the way, you should name the primary python script “_ _ main _ _.py” (without the spaces in between the underscores, devforum formats that as bold) so you could just run the script like the following

python . 
2 Likes

If you meant shutting down the servers, I am using .ROBLOSECURITY token to shutdown server after it is published successfully. For teleporting players to a new server, you can use SoftShutdown

2 Likes

Good Idea! I’ll make it so that if it is specified it will override the values inside the script.

You mean __main__.py? Should I make __main__.py require main.py or just rename it?

By the way you can escape the markdown using \_\_main\_\_

1 Like

No i mean the recommendation algorithm will push your game back so it won’t get to the recommendations page.

1 Like

This isn’t related to this resource. This lets you publish your updates on time and also let you publish it without needing to be on your computer.

Yeah but when you update your game then the recommendation algorithm will have a lesser chance of being on the recommendations page.

I guess this is only useful if you didn’t bring your laptop with you and you’re going out and you finished with the update before going out and publish it while you’re out

I would 50% like this cuz I barely update games now

but when looking at the code, I noticed that I was only able to get these libraries provided in PyCharm, but not in VSCode, so I assumed you used PyCharm to make this

Some games have a scheduled update time (E.g. Every Friday 5 EST).
If they are unavailable at the update time they could use this.

Additionally, some games have more than 2 places and it would be a hazzle to update them all at the same time, and with this script, they can update on time.

I only used VSCode to develop this script, and all the libraries I used are already provided when python is installed (I think)

though I do like your idea, You used VSCode to get it (i am unable to get it working in VSCode even though I have Python installed :/)

1 Like

I guess I need my computer to be turned on in order for this to work, right?

Yes, or you can use a VPS which will execute this code for you.

ok time to open replit to set it up then

1 Like

Just a tip: If you can avoid using sensitive information then do and in this case you can. It is possible to use the MessagingService Open Cloud API to tell all active servers to kick all players. This way you won’t even need to worry about the cookie getting invalidated.

That is one reason why I made an option that lets you use .env

Perhaps I can add a config to let you define a event that will be sent when the game gets shutdown. But you will need to handle the shutdown logic in game by yourself.

Edit:

.env files are just regular text files used to store ENVironment variables so if that file gets compromised your security cookie will be as well, mine was just a tip to reduce the risks and to make it more practical due to IP changes invalidating the cookie.

Name main.py __main__.py so you won’t have to write python main.py and can use python .

1 Like

You got what I put in my fork :sweat_smile:

1 Like

PythonPublisher | Version 1.1.0


Renamed main.py to __main__.py @bitsplicer
Made it aware of sys.argv so you can now input args using command bar @bitsplicer
Made it so you can specify a MessagingService event name to make it fire when publish @NinjaFurfante07
Remade handling variables from .env
+ More!

View on Github

1 Like