Skip to main content

A high performance asynchronous Cassandra and Scylla client

Project description

WORK IN PROGRESS, use only for developing

Install

There is an Alpha realease compabitble with Python 3.7 and Python 3.8 for Linux environments uploaded as a Pypi package. Use the following command for installing it:

pip install acsylla

If you are using another operating system, like Mac OS, you will need to compile the module by hand, follow the instructions that are described in the Developing section.

Usage

The following snippet shows the minimal stuff that would be needed for creating a new Session object for the keyspace acsylla and then peform a query for reading a set of rows.

import asyncio
import acsylla
async def main():
    cluster = acsylla.create_cluster([host])
    session = await cluster.create_session(keyspace="acsylla")
    statement = ascylla.create_statement("SELECT id, value FROM test WHERE id = 100")
    result = await session.execute(statement)
    row = result.first()
    value = row.column_by_name("value")
    await session.close()
asyncio.run(main())

Acsylla comes with a minimal support for the following objects: Cluster, Session, Statement, PreparedStatement, Batch, Result, Row and Value.

Developing

For developing you must clone the respository and first compile the CPP Cassandra driver, please follow the instructions for installing any dependency that you would need for compiling the driver:

git clone git@github.com:pfreixes/acsylla.git
make install-driver

Set up the environment and compile the package using the following commands:

python -m venv venv
source venv/bin/activate
make compile
make install-dev

And finally run the tests:

docker-compose up -d
make test

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

acsylla-0.1.0a0-cp38-cp38-manylinux2014_x86_64.whl (4.9 MB view hashes)

Uploaded CPython 3.8

acsylla-0.1.0a0-cp37-cp37m-manylinux2014_x86_64.whl (4.9 MB view hashes)

Uploaded CPython 3.7m

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