Thanks again Richard, Dave for your useful hints.
Just to clarify, the need of trusting a user with formula editing is for allowing a non-IT trusted user to edit the business logic that has to be processed in an application. That means getting data from the database, processing it, storing the results in the database. Dictionaries proved to be a safe way to deliver and receive data to/from the business rules.
Traditionally, this issue has been solved before with a business rules engine. Drools (
http://www.drools.org/) is a good example I got to know, and I was looking for something similar for python when I realized that it is not easy to find those tools for python, probably because this language is easy enough.
With regard to Jupyter, it has been for a long time in my radar, but I had no time to get to it. As for what I have read, Jupyter would be safe place to allow people to operate with the data but maybe there is no easy way to allow the user to give back the processed data, as Richard mentiond, but maybe I'm wrong.
I don't foresee a lot of people editing formulas. This would be a critical task assigned to a well known and trusted user.
Until now, as for the suggestiongs received I'm more inclined to explore the DSL way or creating a safe sandbox in python.
Thank you guys for your useful help and interest.
Best regards.