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