Editing Curve Assets With Python

Is there a way to edit Curve Linear Color assets using Python? I want to make a tool that generates color curves and populates curve atlases with them automatically but I don’t know how to add/edit keyframes on standalone curve assets specifically.