Пример #1
0
from docx import Document
from shotgun_api3 import Shotgun

# Setting up API for Shotgun
SERVER_PATH = ""
SCRIPT_NAME = ''
SCRIPT_KEY = ''
sg = Shotgun(SERVER_PATH, SCRIPT_NAME, SCRIPT_KEY)

# Tools used to Query the project name to their ID
proj = sg.find_one("Project", [["name", "is", "Walt Denny"]])
print proj
query = sg.schema_read()['Asset'].keys()
print query
print sg.schema_read()['Asset'].get('sg_rpm_number')

# Function to format the text that gets read by Note_Thread_Read
def formatted(x):
    x.pop("type", None)
    x.pop("id", None)
    Name = x.get('created_by', {}).get('name')
    Name2 = x.get('user', {}).get('name')
    global thread
    if 'content' in x:
        if Name == None:
            thread += "\n"
            thread += str(Name2) + ":"
            thread += "\n"
        else:
            thread += "\n"
            thread += str(Name) + ":"