I’m sure you might be able to use the ignition.conf or another file on the gateway such as an ini and use ConfigParser to read the config.
You can get the ignition install directory using: How to get Ignition install directory (OS agnostic)? - #3 by nminchin
Note: this will only work from the gateway scope, so from gateway event scripts, tag change events, etc.
What are you trying to store?