python-shell
python-shell copied to clipboard
How to send .env variables?
The Question: How do I send my whole .env file to a python script?
Any relevant python/javascript code: I was trying the following with no success:
let options = {
args: [req.params.streamId, req.params.term],
env: process.env
};
PythonShell.run(
"scripts/associations.py",
options,
(err, results) => { ... }
)
have you tried passing envs as an extra argument and read it back in using *kwargs ?