Easy way to test components in a interactive python terminal

I’m hacking through trying to create a new entity, and it would be very useful to be able to start up an interactive python terminal to be able to test my code live without having to restart my HA instance to test every change. Is there a way to run a python session where I would be able to import my code and have it talk to the entities in my live HA instance? What would I have to do to get the right python path, and is it even possible for an interactive terminal to talk to entities in a running HA instance?

I started looking at this: https://github.com/vxgmichel/aioconsole which might help you. I think it should be possible to hack a version of HASS to add in this console, then you can connect to it and run arbitrary co-routines in the HASS instance.

Did you ever figure out a way to run an interactive terminal with HA?