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第三方库


热门话题
带有servlet、jsp和数据库的应用程序的java结构   java Admob本机Express广告   java无法在会话超时时获取会话范围的bean   java的“xmlns=”http://www.intellij.com/uidesigner/form/“`由Intellij以.xml格式标记为红色   迭代器在Java中重写Iterables<Obj>的正确方法   java如何刷新我的默认表模型   无效URL上的java PrettyFaces重定向循环   java如何将JSON数组传递给SpringMVC?   java如何从setOnClickListener获取数据并将其传递给倒计时程序   从java运行grep命令后bash获取错误   java[Ljava.lang.String;@5d79a22d结果   java错误p:ajax更新   请在这段代码中解释java instanceof关键字