Add support for versioning in dataiku-api-client package

0 Kudos

Add support for versioning in dataiku-api-client package so that either of these approaches can be used to find out what version of the dataiku-api-client one has installed:

 

 

 

from importlib.metadata import version
version('dataiku-api-client')

import dataikuapi
dataikuapi.__version__

 

 

Also why can't we have the package name match the import name like in most other Python packages? Thanks

 

3 Comments

Note the reason this is needed is that when using the dataikuapi package outside DSS you should always have a dataikuapi package version >= than the DSS version  of the environment you are trying to connect to.

Note the reason this is needed is that when using the dataikuapi package outside DSS you should always have a dataikuapi package version >= than the DSS version  of the environment you are trying to connect to.

Actually the first way works outside of Dataiku. Also this other way works too outside of Dataiku:

import pkg_resources
package = pkg_resources.get_distribution("dataiku-api-client")
print(package.version)

 

Actually the first way works outside of Dataiku. Also this other way works too outside of Dataiku:

import pkg_resources
package = pkg_resources.get_distribution("dataiku-api-client")
print(package.version)

 

However it will be better if dataikuapi.__version__ is implemented so that the version can be checked inside DSS as DSS imports packages from the PATH so the other methods to check the version will not work.

However it will be better if dataikuapi.__version__ is implemented so that the version can be checked inside DSS as DSS imports packages from the PATH so the other methods to check the version will not work.