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.

3 Likes

Hey Ricardo, it doesn’t actually make sense that Sg follows the VFX Reference Platform. The VFX Reference Platform is for integration between 3rd party applications like Nuke/Max/Maya/Houdini etc. But what if you just want to build around Sg without integrating with other 3rd party applications? Like a file importer.

At some point the SG API has to be made workable with Py 3.12, 3.13, 3.14 so why not do the work now and let developers decided if they need to integrate with the VFX Ref Platform applications or if there are building something standalone. Its just artificially limiting the eco system for really no good reason. Hope Autodesk is reading that at some point (cc @carlos-villavicencio ). Thanks

I personally haven’t had that much issue with our custom tools updating them between any of the Python 3.x versions.

If you use good development methods you should be able to run with all the versions currently supported? Is there something new missing that would be super good to have?

Hey guys, we’re working on the Python API to support these newer versions of Python. We’ll keep you updated.

3 Likes

I’m not sure what you mean @Ricardo_Musch. The topic for me here is that the SG Api officially supports 3.12, 3.13, 3.14. The last time I tried the SG Api with 3.12 there was an issue that doesn’t exist in 3.11. My request is just that Autodesk supports all recent Python versions without us needing to work around it.

Beautiful. Thank you @carlos-villavicencio

Not trying to be annoying about this but the pypy page stickers show support for 3.7-3.11.

CY2025 also targets Python 3.11.x

I understand your wish to support more recent versions however as a tool targetted at the VFX industry and it’s wider counterparts I do understand the first priority is to keep in line with the VFX Reference Platform as it is what all studios and software should be doing.