Add support for versioning in dataiku-api-client package

Options
Turribeach
Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 1,737 Neuron
edited July 16 in Product Ideas

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

0
0 votes

New · Last Updated

Comments

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 1,737 Neuron
    Options

    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.

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 1,737 Neuron
    edited July 17
    Options

    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)

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 1,737 Neuron
    Options

    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.

Setup Info
    Tags
      Help me…