A while ago I wrote a Python library for interfacing Open5GS HSS to Python.
The Open5GS HSS uses a MongoDB backend, so the library is just running formatted Mongo queries.
You can create, edit and delete subscribers in the HSS, along with modifying any parameters you can from the WebUI.
Take a look:
https://github.com/open5gs/open5gs/tree/master/misc/db/python