用于奇偶校验的秘密存储api调用和会话的python包。
secretstore的Python项目详细描述
秘密商店python包
这是一个python库,用于与奇偶校验的秘密存储进行交互。 它是一个抽象层(api),位于官方 secretstore module RPC API和 secretstore sessions。 命名约定遵循底层api。
文档是为这个库及其功能准备的。有关的详细信息 秘密商店是如何运作的,请参考Parity wiki。 大部分功能描述都是从那里复制过来的。
维护人员
primary:亚当·纳吉(@ngyam)
文档
阅读文档:https://secretstore.readthedocs.io/index.html
快速启动
pip install secretstore
然后在您的项目中:
fromweb3importWeb3,HTTPProviderfromsecretstoreimportSecretStoreweb3=Web3(HTTPProvider("http://127.0.0.1:8545"))# endpoint exposed by your Secret Storess=SecretStore(web3,"http://127.0.0.1:8090")# secretstore API callsss.something..# secretstore session callsss.session.something..
如果您想知道如何设置秘密存储群集,请查看正式的config guide,然后查看nodes_ss_dev/文件夹。
示例
您可以在tests中看到一些示例。
贡献
请阅读contributing和我们的code of conduct了解详细信息。
开始(作为开发人员)
先决条件
- Python3.5+
安装
git clone https://github.com/energywebfoundation/secretstore-py.git
pip install -e .[dev]
运行测试
achtung:请确保首先启动本地机密存储群集。
- 开始节点
cd nodes_ss_dev
./start.sh
- 运行测试
cd tests
python3 -m unittest
- 摆弄完了:
cd nodes_ss_dev && ./stop.sh
版本控制
我们使用SemVer进行版本控制。版本号被bumpversion
工具撞毁。
许可证
此项目是在gplv3许可下授权的-有关详细信息,请参见LICENSE文件。
致谢
- 特别感谢平价