Creating User Profiles In Python
-
28-09-2019 - |
Question
I'm making a small python game with pygame. I'd like to be able to have multiple profiles with different stats, upgrades, etc. My biggest problem is storing this information persistently. I've already thought about MySql but I don't know how I could connect to it and I would prefer some way to be able to distribute it without requiring a database. Any suggestions? Many thanks.
OTHER TIPS
sqllite3
will probably be the easiest way forward. It's lightweight and doesn't need to be installed by users. To access it though, consider using an ORM (Object Relational Mapper) to simplify things. SQL Alchemy and Storm are both good tools.
An ORM deals with the nitty-gritty of writing SQL code and so forth. If you want to hop between databases, it's often just a matter of changing a single line of code.