-
using .z.w to call python
We have a “legacy” python system where some quant researchers using qpython to query data from q processes into python.
At one q process, I have something like
.z.po:{if[not any (`$.z.w"system "echo $USER"") in exec distinct user from .perm.users;hclose .z.w]};
where column user in table .perm.users includes all users with permission.
So basically, an extra layer of security is added to validate the user trying to connect.
I was thinking about applying the same method to Python APIs, which is connecting using qpython. Theoretically, the following should work
.z.po:{if[not any (`$.z.w"os.getenv("USER")") in exec distinct user from .perm.users;hclose .z.w]};
Does anyone have experiences using .z.w or any tools to send query to python from q?
Thanks.
Log in to reply.