pilosa的python客户端库

pilosa的Python项目详细描述


pilosa的python客户端

pilosa高性能分布式行索引的python客户端。

有什么新消息?

见:CHANGELOG

要求

  • 与pilosa 1.2和pilosa 1.3兼容
  • 需要Python2.7及更高版本或Python3.4及更高版本。

安装

pilosa客户端位于PyPI。可以使用pip

安装库
pip install pilosa

用法

快速概述

假设Pilosa服务器在localhost:10101运行(默认值):

importpilosa# Create the default clientclient=pilosa.Client()# Retrieve the schemaschema=client.schema()# Create an Index objectmyindex=schema.index("myindex")# Create a Field objectmyfield=myindex.field("myfield")# make sure the index and field exists on the serverclient.sync_schema(schema)# Send a Set query. PilosaError is thrown if execution of the query fails.client.query(myfield.set(5,42))# Send a Row query. PilosaError is thrown if execution of the query fails.response=client.query(myfield.row(5))# Get the resultresult=response.result# Act on the resultifresult:columns=result.row.columnsprint("Got columns: ",columns)# You can batch queries to improve throughputresponse=client.query(myindex.batch_query(myfield.row(5),myfield.row(10),))forresultinresponse.results:# Act on the resultprint(result.row.columns)

文档

数据模型和查询

见:Data Model and Queries

执行查询

见:Server Interaction

导入和导出数据

见:Importing and Exporting Data

其他文件

贡献

见:CONTRIBUTING

许可证

见:LICENSE

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java获取范围内的素数和总素数   JAVAlang.IllegalArgumentException:找不到无效的URL或资源。JavaFX图像   java我可以在vaadin中直接流式处理ZipFile吗?   apache poi java poi HSSFsheet如何添加包含图片的页眉和页脚?   java如何在swing中使用GridLayout使列大小不同?   java为什么JPasswordField中的getText()被弃用?   java整数对象是如何创建的?   java在JAAS的策略文件中授予URL权限   linux Openssl(shell脚本)相当于java解密代码   java是无服务器的,结合事件源是可能的吗?   java JPA双向Uknown列   javajavax。加密。IllegalBlockSizeException:解密加密的AES字符串时最后一个块未完成   java如何知道我的ProcessBuilder start()是否成功执行了这些命令   本地特定错误消息中的java插值   java控件SFX通知异常   java文本输入if语句JavaFX   swing java未连接到水平组   java泛型,迭代器>无法访问内部类函数   java如何跳过当前页并写入下一页?   java一次导入许多静态字符串