Is there a way to auto-update latest scripts from Library to API endpoint?

Options
Srini_E
Srini_E Registered Posts: 14

Hi,

Currently I'm copying the scripts from Dataiku library to API endpoint code. Is there a way to auto-reflect latest code from library to API endpoint?

API endpoint.PNG

Tagged:

Answers

  • Zach
    Zach Dataiker, Dataiku DSS Core Designer, Dataiku DSS Adv Designer, Registered Posts: 153 Dataiker
    edited July 17
    Options

    Hi @Srini_E
    ,

    To clarify, are you talking about project libraries that you're using within your API endpoint?

    Project libraries are automatically included in API services, so you can pull the latest version of your libraries by publishing a new version of your API service and deploying it to your API node.

    You can use project libraries within your API endpoint by importing them, as shown below:

    # Import my_custom_lib.py from your project library
    from my_custom_lib import foo
    
    # Python function endpoint
    def api_py_function():
        return foo()

    Does this answer your question?

    Thanks,

    Zach

Setup Info
    Tags
      Help me…