You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Patrick Boucher edited this page Jun 27, 2013
·
2 revisions
Here is example code to show how to establish your initial connection that you will use to interact with the Shotgun server.
Prior, you should have set up Shotgun for API access. This will provide you with a script name and script key to use when establishing your connection.
importpprint# Useful for debuggingfromshotgun_api3importShotgunSERVER_PATH="https://your_site.shotgunstudio.com"SCRIPT_NAME='my_script'SCRIPT_KEY='27b65d7063f46b82e670fe807bd2b6f3fd1676c1'sg=Shotgun(SERVER_PATH, SCRIPT_NAME, SCRIPT_KEY)
# This, for demo purposes will print property and method names available on the sg connection objectpprint.pprint([symbolforsymbolinsorted(dir(sg)) ifnotsymbol.startswith('_')])