Getting started with 1Password for your growing team, or refining your setup? Our Secured Success quickstart guide is for you.
Forum Discussion
ArwenD
11 months agoNew Contributor
Pulling password and storing in variable in python
I am trying to run a python script directly from VSC. Especially for testing, I am not utilizing powershell and I want to store credentials pulled from OP into a variable, but this is not working... I tried variable=os.system("op read op://url")
and this returns the variable as "0"
. I then tried utilizing a .env file and calling the variables by: os.system("op run --env-file="./envfile.env"")
I know I'm doing something wrong, but I just don't know what... I did also try setting the variable from PS, but didn't have luck with that.
1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided
Browser: Not Provided
No RepliesBe the first to reply