GachaPy
A Python engine for gacha games
What is this?
gachapy is a collection of both low and high level objects that can be used as a framework to create gacha games. It contains a Controller class for high level management of the game, abstracting away the nitty gritty of item and player management. Controllers can be saved and loaded through the loader library of functions to and from JSON formatted files. More information can be found in the documentation below.
Install through pip
pip install gachapy
gachapy PyPi page
Documentation
gachapy documentation
Example Application
import gachapy
controller = gachapy.Controller()
controller.add_new_item("apple","a",2)
controller.add_new_item("banana","b",3)
controller.add_new_item("carrot","c",10)
controller.add_new_banner("food","f",["a","b","c"],5,"1 + 1 / R")
controller.add_new_player("jacob","j",100)
controller.pull("j","f")
jacob = controller.find_player_by_id("j")
print(jacob)
gachapy.save_controller(controller,"save.json")
More examples can be found in the examples/
directory