Hi @Aya, Yes. You can do that. If you double-click on the Dragonfly components you will see that most of the code has no Grasshopper/Rhino dependency. You should be able to copy/paste most of the code directly from the component.
You can find the SKDs here:
https://discourse.ladybug.tools/pub/ladybug-tools-core-sdk-documentation