双客户端蟒蛇
pygridgain的Python项目详细描述
pygridgain
GridGain社区版瘦(二进制协议)客户端,用Python3编写
先决条件
- Python3.4或更高版本(测试了3.6),
- 访问GridGain节点,本地或远程。当前瘦客户端 版本在GridGain CE 8.7(二进制客户端协议版本)上测试 1.2.0至1.4.0)
安装
对于最终用户
如果您只想在项目中使用pygridgain
模块,请执行:
$ pip install pygridgain
对于开发者
如果要运行测试、示例或生成文档,请克隆 整个存储库:
$ git clone git@github.com:gridgain/gridgain.git
$ cd gridgain/modules/platforms/python
$ pip install -e .
这将把pygridgain
的存储库版本安装到您的环境中
在所谓的“开发”或“可编辑”模式下。你可能会读到更多关于
editable installs
在pip
手册中。
然后运行requirements
文件夹的内容进行安装
使用
$ pip install -r requirements/<your task>.txt
您可能还想查阅setuptools
手册,了解如何使用setup.py
。
文件
The package documentation可用 在rtd为您提供便利。
如果您想从源代码构建文档,那么开发人员是否 如上所述安装,然后运行以下命令:
$ cd gridgain/modules/platforms/python
$ pip install -r requirements/docs.txt
$ cd docs
$ make html
然后打开gridgain/modules/platforms/python/docs/generated/html/index.html
在浏览器中。
示例
中提供了一些使用pygridgain的示例
gridgain/modules/platforms/python/examples
文件夹。它们是广泛的
在中评论
“Examples of usage”
文档的一节。
这段代码意味着它是在带有pygridgain
包的环境中运行的
已安装,并且gridgain节点正在localhost:10800上运行。
测试
运行
$ cd gridgain/modules/platforms/python
$ python setup.py pytest
nb!所有测试都需要在localhost:10800上运行gridgain节点。 如果需要更改连接参数,请参阅 testing。