The __version__ module is accessible via the sqlobject module.
3
'alpha'
(3, 0, 0, 'alpha', 2)
None
0
'3.0.0a2'
2
See the source for more information.