0

Can I create a new script in Shotgun through python?

Using Pythons shotgun_api3 module, there doesn't seem to be a "script" entity type? I've just started using the module and shotgun, and I don't have Admin privileges on shotgun. I want to be able to create new scripts in shotgun, return the generated application key and be able to feed that into the other scripts I need to create, just so if the Admin isn't available and to stop hassling them all the time :)

Thanks,

Lee.

2 comments

  • 0
    Avatar
    Jake Wilson

    Application keys serve two purposes: 1. Allows administrators to identify what scripts are doing what in the logs.  2. To protect Shotgun and all of your assets and data managed by Shotgun.  If anyone was able to create scripts that could freely interact with your Shotgun server WITHOUT the need for an Application Key... well can you imagine what kind of security problem that would create?  Anyone could write a simple script that can do bad things, like delete anything or everything.

    Even if you trust everyone in your group, mistakes can happen as well.  A novice Python scripter might accidentally write something that does something bad to the assets in your server (and maybe he doesn't even know it does something bad).  As long as the Shotgun admin handed out a unique Application Key to that novice user, they are able to 1. Identify the script/user, 2. Deny access to the script, 3. Say "hey man your script is deleting stuff. Fix it."

    Applications Keys are exactly what they say they are.  Keys to the application.  Just like keys to a car.  Not requiring keys will eventually result in something bad happening.

    If you don't like bothering your admin, just ask him to generate like a dozen keys for you.  As long as he records that they are used by you and only you, then you can be free to use them and not bother him again for a while until you run out.

  • 0
    Avatar
    Lee Dunham

    After i posted it dawned on me, such a stupid question. "Would I leave my house keys in the door when I leave?"

    Cheers fella, doing just that.

Please sign in to leave a comment.