Dynamo and Python Shell

I am a new member here and I want to ask a question which I cannot find its solution.

Now I understand how to make extensions and how to write down the scripts in the python shell.

However, I consider myself weak regarding libraries and modules topics so, I wonder how complex it is to run a python graph (that I had written in Dynamo and has classes from both Dynamo and Revit APIs) in the python shell. I tried to run one but it gave me many errors and as a result, I didn’t step further since then. So, any help and courage will be much appreciated.

Thank you.

Update: I was not aware of the PyRevit doc website (https://pyrevit.readthedocs.io/) and I think I found what I need.