Fetching entity level status list

Hi Team,

How to fetch entity level status list like (Shot, Asset, Task) using shotgun python API.

2 Likes

Hello @mahesh197

I would recommend you to take a quick look into the doc
https://developer.shotgunsoftware.com/python-api/
https://developer.shotgunsoftware.com/python-api/cookbook/tutorials.html

You will find most of the information you are asking for. The doc is pretty well made and easy to follow.

Cheers

2 Likes

Thanks for the links, Jerome! More specifically the schema functions will let you query/edit the field properties:

https://developer.shotgunsoftware.com/python-api/reference.html#working-with-the-shotgun-schema

1 Like

Cleanup note: moving this topic to the Shotgun category!

image

1 Like

Hi Guys, Thanks for the replay but my question is Fetching entity specific status list
Ex: For shot entity we have different status list like (ip, fin, hld…) and for Asset we have different status list like (ip, omit, rdy…) same for Sequence also. I want to show this specific list to my user. How to fetch this specific status list data?

1 Like

Hi @mahesh197,

@Jerome_Drese gave the correct answer here, and @brandon.foster narrowed it down to the right place, but as an example, this is how you would get the valid values for Shot statuses:

>>> sg.schema_field_read("Shot","sg_status_list")

{'sg_status_list': {'mandatory': {'editable': False, 'value': False}, 'name': {'editable': 
True, 'value': 'Status'}, 'data_type': {'editable': False, 'value': 'status_list'}, 
'entity_type': {'editable': False, 'value': 'Shot'}, 'custom_metadata': {'editable': True, 
'value': ''}, 'editable': {'editable': False, 'value': True}, 'ui_value_displayable': 
{'editable': False, 'value': True}, 'visible': {'editable': False, 'value': True}, 'unique': 
{'editable': False, 'value': False}, 'properties': {'default_value': {'editable': True, 
'value': 'wtg'}, 'hidden_values': {'editable': False, 'value': []}, 'valid_values':
{'editable': True, 'value': ['wtg', 'rdy', 'ip', 'hld', 'omt', 'cbb', 'fin']}, 'summary_default':
{'editable': True, 'value': 'status_list'}, 'display_values': {'editable': False, 'value':
{'cbb': 'CBB', 'ip': 'In Progress', 'omt': 'Omit', 'rdy': 'Ready to Start', 'wtg': 'Waiting to
Start', 'hld': 'On Hold', 'fin': 'Final'}}}, 'description': {'editable': True, 'value': ''}}}

If you look at the resulting hash, you’ll see that what you’re looking for is there under valid_values. Hope that helps.

5 Likes