A new version of ShotGrid Python API v3.7.0 has been released!

What’s new?

Remove unnecessary data in the payload when combining related queries before sending it to the server. This would improve overall performance decreasing network latency and server processing.

Affected methods

  • find
  • summarize
  • text_search (API query_display_name_cache)

Detailed Description

The change should transform calls like:

sg.find('Asset', [['project', 'is', {'created_at': datetime.datetime(2015, 12, 16, 11, 2, 10, tzinfo), 'id': 72, 'name': 'Demo: Game', 'type': 'Project'}]]) 

as if the following had been called:

sg.find('Asset', [['project', 'is', {'id': 72, 'type': 'Project'}]]) 

This version also includes a new environmental variable to enable this feature. Please use it at initialization if you want to compare results or if you are getting any unexpected behavior.

export SHOTGUN_API_ENABLE_ENTITY_OPTIMIZATION=1

For in-depth review, check out the full source code

This is an experimental feature. Feel free to disable this feature if you are experiencing any issues.

Full Release Notes: Release v3.7.0 · shotgunsoftware/python-api · GitHub

4 Likes

Any news on python 3.12 / 3.13 support?

Sg follows the VFX Reference Platform so if the VFX Reference Platform decides that a future version will be using Python 3.12 then Sg will also upgrade its components/software to v3.12.

I would advice you to keep track of the VFX Reference Platform and not deviate from it if you want to have an easy life with all the VFX software/DCC’s you may use in your pipeline.

2 Likes