Skip to main content

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
  • 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

See: Data Model and Queries

Executing Queries

See: Server Interaction

Importing and Exporting Data

See: Importing and Exporting Data

Contributing

See: CONTRIBUTING

License

See: LICENSE

Project details


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.2.1.tar.gz (27.6 kB view details)

Uploaded Source

Built Distribution

pilosa-1.2.1-py2.py3-none-any.whl (33.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file pilosa-1.2.1.tar.gz.

File metadata

  • Download URL: pilosa-1.2.1.tar.gz
  • Upload date:
  • Size: 27.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

Hashes for pilosa-1.2.1.tar.gz
Algorithm Hash digest
SHA256 6901f823cb013d025bdcadaa319c862423fc8bc7bd9967c9a7a3b0eac7db658a
MD5 23a95b458b2e814bdfc9d63be814c4e8
BLAKE2b-256 61302a2d3bce889d1a8af8070d4db2c5e5a679eea97f37a2883a28a5b5825944

See more details on using hashes here.

File details

Details for the file pilosa-1.2.1-py2.py3-none-any.whl.

File metadata

  • Download URL: pilosa-1.2.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 33.6 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

Hashes for pilosa-1.2.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 fdcf8a079a2d82b97510f73a30e0117ba46d46a90add2f17f09c644feb7f04fb
MD5 090c3624a1c7201338fe6b9678a27c97
BLAKE2b-256 b875087d8a45df3e39ec8d3fa65f18fa3a3268df75cb36aabad3aba9bd976a81

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page