Hi @Christhian,
Why would you like to Convert a .dyn into an .exe?
The nice thing about Dynamo is that it is easily modifiable and you can share graphs. When a graph does not work for someone they can open it and rewire a few nodes to make it work for them.
If you want to “Secure” your Dynamo code you should not really use Dynamo. You should head to actual Addins written in pure code.
Short anwser is no, you cannot convert a dyn graph in an .exe. There are Revit addins around which let you run Dynamo graphs from the Revit ribbon. Kind of Dynamo player but directly from a ribbon.
EDIT: The Title says Python to exe, but you are asking for Dynamo files (which is not python)
If you mean Python code to exe and using it in Dynamo, that is a whole different and harder topic