What is that Python code? Is it a Python library or is this the Blender API?
That's the blender API, supported by an embedded python interpreter coming with each Blender install