How do you make a Global Leaderboard using python?

I’m planning on making a text based game with a global leaderboard feature, however, I am quite new to python so I don’t have the knowledge to code one.

1 Like

If you don’t have the knowledge to code one, you should probably at least share the repl link

2 Likes

Im planning on making one. I haven’t really started on it rn.

1 Like

Storing data in a txt file is not global.

What’s the difference between the two?

Files aren’t saved between repl forks, and, when run from the cover page, it is run as a “Ghost Fork”. No changes to the owner’s repl, it’s a temporary copy.

1 Like

Thanks for clarifying I thought they were the same thing all this time

@j7jhj Since you’re coding in Python, you could use the Replit Database.

I heard that the database actually ghost forks too so if a user updates the database from the cover page, it won’t actually do anything to the Repl. I know for certain that databases do not fork with the Repl.

1 Like

You need a database, and one that is not repl specific. I would say frst try to learn how to manage a database (pick one of the many free ones that are out there, do not use the replit datastore)

This is my favourie:
https://www.mongodb.com/languages/python/pymongo-tutorial

3 Likes