+1 to what Krux02 said. If you use Nim like that you don't gain very much over
Python. It will not be faster (as Nim and Python both need the work to be done
at runtime) and you won't avoid errors and lose easier reasoning and
refactoring possibilities because the compiler can't check the types for you.
At first that may feel like a limit when using Nim. But after a short time you
will find out that this is something which makes you not "trusting" your code
in Python anymore and keeps your from going back :)