Hi all,
I’m currently building a web scraping infrastructure and would like to use FastAPI for my main application due to its async capabilities, automatic API documentation, and modern Python features. However, I also need to integrate with Grasshopper using Hops for some geometric processing.
From what I understand, ghhops-server is built specifically as Flask middleware and relies on the WSGI interface. FastAPI, on the other hand, is built on ASGI (Asynchronous Server Gateway Interface), which is fundamentally different from WSGI.
My questions:
- Has anyone successfully adapted
ghhops-serverto work with FastAPI or any other ASGI framework? - Are there any technical reasons why this would be impossible or inadvisable beyond the obvious architectural differences?
- Would the McNeel team consider supporting ASGI frameworks in future versions of
ghhops-server, or is Flask/WSGI the intended long-term approach?
Current workaround I’m considering:
Running two separate services, FastAPI for my main application on one port and Flask for Hops endpoints on another will work, but I’d prefer a unified architecture if possible.
I’m comfortable diving into the ghhops-server source code if needed, but wanted to check whether anyone has attempted this before I potentially spend considerable time reinventing the wheel.
Any insights or guidance would be much appreciated.
Thanks in advance!