"Storage" cannot be imported in PyCharm?

SDK: 12.9.0
(viktor-cli version) v0.20.0
Platform: v22.06.2

Hi I want to start working with “Storage()”.
The context of this problem is that I want to generate an Excel export that is filled with intermediate calculated results from what @WebAndDataView produces (in my case a few graphs with calculated results).

I expected that this would have been sufficient:

# in controller 
from viktor.core import Storage

But PyCharm signals me that “‘Storage’ cannot be found in core.pyi”

Therefore, code like this does not compile properly

Storage().get('data_key_1', scope='entity')

and viktor-cli start stops with the error:

ImportError: cannot import name 'Storage' from 'viktor.core'

Can you help me with this please?

Storage has been introduced in v13.0.0

ok, I just upgrades the viktor-cli but that is probably not the same?
How do I get the new SDK?

You can set the SDK version in your requirements.txt. Note that you want to upgrade to a new major version (v12 → v13), so this might involve some migration

OK thanks I will look into that.

Just to be sure: the functionality of exporting intermediate results can only be done using Storage()? Or are there other methods available?

If you mean with ‘exporting’ the downloading of a file, then you could make a DownloadButton that calls a function to calculate the intermediate results and download the desired file to hard disk.