Python
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 11 commits behind vfxetc:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
docs
sgsession
tests
.gitignore
.travis.yml
AUTHORS.txt
LICENSE.txt
README.md
TODO.txt
requirements.txt
setup.cfg
setup.py

README.md

sgsession

Test Status

This Python package is a wrapper around shotgun_api3 for Shotgun which provides a local data cache and some additional intelligence on top of bare entities.

This is not a drop-in replacement for the normal API. While any individual entity in isolation should behave in the same way as with the normal API, the entities are linked behind the scenes and so complex behaviour is likely to break.

Some of the behaviours added include:

  • instance sharing for the same entity: the same conceptual entity will be returned as the same instance, instead of seperate but equivalent instances;
  • agressive caching and merging: newly found entities will have all the fields that we previously knew them to have;
  • entity.fetch(fields) to fetch fields if they do not already exist;
  • entity.parent() to get (and autoload) the logical parent;
  • entity.project() to get (and autoload) the project;
  • session.fetch_heirarchy(entities) to get the entire entity graph up to the top Project;
  • any many more!

Read the docs, and good luck!