Access project management with python

Is it possible to access project management, either read-only or modify them, via python?

In particular, is it possible to access the OCIO config settings for the current project via python? We need to determine which version of OCIO config is being used in order to manage various colourspace namings when it comes to export.

Take a look at the wiretap XML and wiretap python documentation

you mean this? tk-flame/python/tk_flame/wiretap.py at master · shotgunsoftware/tk-flame · GitHub

I read through that and also the hooks it refers to, it’s only able to collect project name and project shotgun name by the looks of it.

Unless you’re referring to something else?

OK, did a little more digging, I think I understand the basic concept for wiretap, which I did a bit of reading around here: Help

However wiretap seems like a bit of overkill for what I’m trying to do here, there’s no clear documentation about how to get started with it either. There’s apparently links to example scripts, but those links either don’t work anymore or they’re tucked away somewhere.

I did manage to get access to the ocio config for a project like this though;

import flame

from pathlib import Path

p = Path(flame.project.current_project.project_folder) / "setups" / "colour_mgmt" / "config.ocio"

print(p.readlink())

So I guess the question is, is this method reliable across versions of flame? Or is wiretap really the way to go to access this kind of info?