Python client library for Pilosa
Project description
Python client for Pilosa high performance distributed bitmap index.
What’s New?
See: CHANGELOG
Requirements
Python 2.7 and higher or Python 3.4 and higher.
Install
Pilosa client is on PyPI. You can install the library using pip:
pip install pilosa
Usage
Quick overview
Assuming Pilosa server is running at localhost:10101 (the default):
import pilosa
# Create the default client
client = pilosa.Client()
# Retrieve the schema
schema = client.schema()
# Create an Index object
myindex = schema.index("myindex")
# Create a Frame object
myframe = myindex.frame("myframe")
# make sure the index and frame exists on the server
client.sync_schema(schema)
# Send a SetBit query. PilosaError is thrown if execution of the query fails.
client.query(myframe.setbit(5, 42))
# Send a Bitmap query. PilosaError is thrown if execution of the query fails.
response = client.query(myframe.bitmap(5))
# Get the result
result = response.result
# Act on the result
if result:
bits = result.bitmap.bits
print("Got bits: ", bits)
# You can batch queries to improve throughput
response = client.query(
myindex.batch_query(
myframe.bitmap(5),
myframe.bitmap(10),
)
)
for result in response.results:
# Act on the result
print(result)
Documentation
Data Model and Queries
Executing Queries
See: Server Interaction
Importing and Exporting Data
Contributing
See: CONTRIBUTING
License
See: LICENSE
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pilosa-0.9.0.tar.gz
(20.1 kB
view details)
Built Distribution
File details
Details for the file pilosa-0.9.0.tar.gz
.
File metadata
- Download URL: pilosa-0.9.0.tar.gz
- Upload date:
- Size: 20.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb60804cd0656092da1fa6aced3457b1f0162268f240ef2aed71b15e9db0b5ad |
|
MD5 | 81fddc0eb07d44b8f30c351867b4ab2d |
|
BLAKE2b-256 | 821e600751d912a24becc25fb89b47f53aed8396f5b67f34c753f9c647a83351 |
File details
Details for the file pilosa-0.9.0-py2.py3-none-any.whl
.
File metadata
- Download URL: pilosa-0.9.0-py2.py3-none-any.whl
- Upload date:
- Size: 28.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ec63685fd5f03ab930e5584815119b70d24dd41dc58566ffe8ebf98e9c7a3d3 |
|
MD5 | 14a73f7ee00052d7da10601b7b463c16 |
|
BLAKE2b-256 | 97275a6673ce27157ad2b1de7b46f6f376ebd394906c50b853799fe43bfc19fe |