I tested, it woks. This is example code:
(define-syntax py:from
(syntax-rules (import as)
[(_ where import name)
(py:run-simple-string (format "from ~a import ~a" where name))]
[(_ where import name as custom-name)
(py:run-simple-string (format "from ~a import ~a as ~a" where name custom-name))]))
(py:from "requests" import "get" as "GET")
(py:run-simple-string "print(type(GET))")
https://github.com/guenchi/fli/blob/bee3468b366665067cc947609450208d4a42f0e2/pycall.sc#L87-L90
I tested, it woks. This is example code: