add __version__ attribute to module (or class) #17

LarsNordin opened this Issue Mar 15, 2012 · 4 comments


None yet

2 participants


It would be nice to be able to display the version of the module from within the code


You can already do this with pkg_resources. Does anybody else think we have a need for this feature?


To be clear: I can run the following on a system where the package is installed:

import pkg_resources
print pkg_resources.get_distribution("jenkinsapi").version

This works but isn't very standard python-ish.


Feel free to have a go at implementing this - it's not a priority but it might be helpful for the doc generator.


I've used @LarsNordin 's solution in the doc generator. It works perfectly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment