Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to send .env variables? #259

Open
DaryaTarasowa opened this issue Oct 20, 2021 · 1 comment
Open

How to send .env variables? #259

DaryaTarasowa opened this issue Oct 20, 2021 · 1 comment
Labels

Comments

@DaryaTarasowa
Copy link

DaryaTarasowa commented Oct 20, 2021

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) => { ... }
)

@dberardo-com
Copy link

have you tried passing envs as an extra argument and read it back in using *kwargs ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants