CodeQL library for Python
codeql/python-all 0.12.1 (changelog, source)

Predicate Value::forString

Gets a Value for the string text. May be a bytes or unicode string for Python 2. There will be no Value for most strings, unless it is explicitly declared in the source program.

Import path

import python
StringValue forString(string text)