Just for clarity of purpose: we provide some api overrides (ex: mpylib.api.MVector) so they can follow the pickle protocol. We did this because that is how we store data on the node between maya sessions. On scene save any data flagged for storage (see the Storage tab) gets pickled and dumped to a Maya string attribute. On scene load, the data is read back in.
So to answer your question: Yes you can use all standard libraries. For example, from maya.api.OpenMayaAnim you could import MAnimControl to query the current frame number. If you wish to store the data between Maya sessions, the data just needs to follow the pickle protocol.
You can also use maya.cmds and maya.mel but do so carefully. Don’t do anything that would dirty another node’s plug and trigger a cascaded scene evaluation that could potentially get Maya to crash. You probably also should only use these any other time than on node initialization because it might slow down the evaluation quite a bit. For example this would be perfectly fine to do:
import maya.cmds as mc
if not hasattr(self,'scene_name'):
self.scene_name = mc.file(q=True,sn=True)
One more thing, the “mPyNode” scene objects that get created are basically DG nodes. In the future, we could make an MPyDeformerNode for custom deformers. An MPyCameraNode for custom cameras. MPyKinematicNode for custom IKs… etc etc… Or maybe someone motivated will look at the source, make their own, and integrate back in the project for all to profit.