Stéphane,

I afraid this won't work. Ignite storage is typed, thus you can not use
values of arbitrary type, but only of Pythonic types that defined
here[1].

If you really want to store such a complex object as a whole, you can
either

1) serialize it with pickle/dill/protobuf/json/et c. and store as a
StringObject or a ByteArrayObject, or

2) define a class with a GenericObjectMeta[2] metaclass, with unique
class name and a schema. It will be an object of a special class, not
an arbitrary typed value, but it may do the job for you.

[1] 
https://apacheignite.readme.io/docs/python-thin-client-initialization-and-configuration#section-data-types

[2] https://apacheignite.readme.io/docs/python-thin-client-binary-types

On Tue, 2019-05-21 at 07:15 +0900, Stéphane Thibaud wrote:
> Any thoughts about this one?
> 
> 
> Kind regards,
> 
> Stéphane Thibaud
> 
> 2019年5月16日(木) 20:55 Stéphane Thibaud <[email protected]>:
> > Hello Ignite experts,
> > 
> > I am trying to store a python value of type 
> > 
> > Tuple[Dict[str, float], bytes]
> > 
> > in an Ignite cache. However, doing that without type hints I get:
> > 
> > TypeError: Type `array of None` is invalid
> > 
> > Do you know if this is possible?
> > 
> > 
> > Kind regards,
> > 
> > Stéphane Thibaud

Reply via email to