Skip to content

This python module helps you easily create save data for your python app or game!

License

Notifications You must be signed in to change notification settings

BlurrySquire/Python-JSON-SaveData

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python-JSON-SaveData

This python module helps you easily create save data for your python app or game! It only requires a few function calls to work, and uses default python modules, so no need to install any other modules. There is no need to credit me but it would be appreciated.

GitHub Downloads (all assets, all releases) GitHub Release

QuickStart Guide

  1. To start you must download save_data.py here.
  2. This is an example of the usage:
from save_data import *

if __name__ == "__main__":
    # Create a dictionary to contain the save data.
    save_file_data = {
        "user_info": {
            "username": "guest user"
        },
        "wins": 0,
        "loses": 0
    }

    # Create a savefile. If the file doesn't already exist then it creates it.
    save_file = SaveFile("test.json")

    save_file.write(save_file_data)
    print(save_file.read())

    # Modify save data to ensure it is writing the file properly
    save_file_data["wins"] = 1
    save_file.write(save_file_data)
    print(save_file.read())

About

This python module helps you easily create save data for your python app or game!

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages