Well for most of it you can just do "from sqlalchemy import Function, FunctionElement" in both, its the use of _FunctionGenerator that's non-public here, im not seeing the usage of that symbol as so compelling here?   would be better for you to use a __getattr__() scheme on top of "sqlalchemy.func" instead of using internals.