Python client library for Pilosa
Project description
Python Client for Pilosa
Python client for Pilosa high performance distributed row index.
What's New?
See: CHANGELOG
Requirements
- Compatible with Pilosa 1.2 and Pilosa 1.3
- Requires 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 Field object
myfield = myindex.field("myfield")
# make sure the index and field exists on the server
client.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 result
result = response.result
# Act on the result
if result:
columns = result.row.columns
print("Got columns: ", columns)
# You can batch queries to improve throughput
response = client.query(
myindex.batch_query(
myfield.row(5),
myfield.row(10),
)
)
for result in response.results:
# Act on the result
print(result.row.columns)
Documentation
Data Model and Queries
Executing Queries
See: Server Interaction
Importing and Exporting Data
See: Importing and Exporting Data
Other Documentation
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-1.3.0.tar.gz
(28.6 kB
view details)
Built Distribution
File details
Details for the file pilosa-1.3.0.tar.gz
.
File metadata
- Download URL: pilosa-1.3.0.tar.gz
- Upload date:
- Size: 28.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e65523d82ecc2a4170bc06f1ff3ddce16de50d109893062f357d8e8df27a0efd |
|
MD5 | 0288883cdb569acb7d54a6cb9c907eb2 |
|
BLAKE2b-256 | 6c76370e61bb1fe664d5a12b26bc39639c3cce306907c684e930c36c346e11c0 |
File details
Details for the file pilosa-1.3.0-py2.py3-none-any.whl
.
File metadata
- Download URL: pilosa-1.3.0-py2.py3-none-any.whl
- Upload date:
- Size: 33.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62979187e818dd9e3e8cb26cbf882a63f7fbd06104381a91d2e4d45d070eed1e |
|
MD5 | 41e9fb36cb05b4d03d4578c8218075fd |
|
BLAKE2b-256 | 4f7383bd57ee4984b5e8a90209ce0d19b5f96e64d605d120dc0fd485ee4472a1 |