As @zopyx has suggested, the browser view may be the way.
There's a pattern explained here: https://github.com/plone/plone.api/issues/268
Unless I'm misunderstanding how it works, it looks like you would have to register a browser view which could then be called from restricted python.
It is simple to add and helps everyone using restrictedpython in the future. Once added then you can use the normal import which is more intuitive and what a first time user is likely to try.
I know how to do it with a browser view, but I try to avoid it since this is in a theme.
Why? … because the whole point of the theme is to make it possible for everybody to 'use whatever they find there in their own theme', without having to install add-ons etc.
I dont 'need' anything: I am just trying to make something for the community to help with the lack of themes etc. in Plone 5.