python - 在 Python 中使用 credstash

标签 python windows python-3.x amazon-web-services credstash

我已经安装了credstash在我的电脑上。我可以在命令提示符下使用“credstash get [credential]”等命令。

但是,在 python 解释器中,使用“import credstash”后,尝试使用“credstash get [credential]”命令时出现语法错误:

>>> import credstash
>>> credstash get credstash
   File "<stdin>", line 1
    credstash get credstash
                ^
SyntaxError: invalid syntax

最佳答案

该语法适用于命令行,对于Python,您应该使用credstash.getAllSecrets()credstash.getSecret()

关于python - 在 Python 中使用 credstash,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40765742/

相关文章:

python - tensorflow 中两个向量的点积

mysql - 无法连接到 MySQLCC ERROR 1043 Bad Handshake 上的 MySQL 服务器

c++ - 在 VC++ 中构建时重命名 dll 文件

windows - Windows 7 上的 Microsoft Access 文本 ODBC 驱动程序

python - Win7/Python3.3 : PyLint failed to load its plugins

python - 外部使用 Django 数据库模型

python - OpenCV warpPerspective 不适用于单应性

python - 如何使用 Numpy 更快地最小化这个距离? (找到两个信号彼此接近的移位索引)

Python:为什么使用 zip(*) 而不是 unzip()?

python-3.x - 使用 psycopg2 将 git 修订散列 (SHA-1) 写入 PostgreSQL 数据库