Hey @JokerMartini,
Sorry I forgot about this post for a few days. Reading some comments from the other thread that deals with more or less this same problem inspired me find a better solution than the one I currently had implemented. Here’s a reproducible demo singleton file for you to check out:
I believe the demo code from above answer your question as to how I normally use the ShotgunClient
wrapper, but in case it’s not very clear: There’s a lot of repeated code across a given project for stuff like “get all shots in a project”, which usually leads me to create a place to collect these common calls. This “place” is also a handy storage location for other related things like connection instances, session ids, etc.
Usually this blows out into it’s own shotgun
wrapper module for me, which generally contains a class like the ShotgunClient
wrapper along with misc helper methods that’s required for generating and extracting entities and other useful things.
Run the code from the gist above, see how it feels, and let me know if you have any more questions. There’s probably an infinite number of ways to solve this design-challenge, this is just my (current) preference.