· May 15

Embeded python : Can I create a dict from COS?

Hi, I need to use some pythonic library from cos.
To use them I need a python dict with some python object in it
Ex in python:

obj = pythonObject("value1")
dict = {object : obj  ,key : "value2"}
result = pythonFunc(dict)

To do that I first tried to pass by dynamic object, to later convert them in dict from Json. But unfortunately the dynamic object doesn't accept python object inside it. And my pythonic function need to have an instance of my python object.
So I tried with the python built-in function dict() to create a python dictionary, but I'm not sure how to use it as in the python documentation I need to do dict(key1 = value1, key2 = value2).
Is it possible to create dict in COS using embeded python or if there is another way?

Product version: IRIS 2023.3
Discussion (2)1
Log in or sign up to continue