Python guy needed for dshub

I need some python knowing guy that can tell me how we can use python in order to create scripts. At the moment I can run any script I like via dshub, but I dont know what interface or what objects to pass to the python environment ( or namespace ? ) so that the script can do what its supposed to with dshub objects.