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 and MacOS environments uploaded as a Pypi package. Use the following command for installing it:
pip install acsylla
For MacOS you would need to install the following libraries for make it work:
brew install libuv openssl
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
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 Distributions
Built Distributions
Hashes for acsylla-0.1.3a0-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8884394d54dab0f42b31b206f4e196e7b84be088e95e881df43158866158d8c0 |
|
MD5 | 23854768c556d9f7d65c0dc883564618 |
|
BLAKE2b-256 | 14d756b84f0288d8dd5e24d799d4df042b0a62120522d17702bd91ad5cab31e6 |
Hashes for acsylla-0.1.3a0-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34935cad92ea8da4967d47b2453f9f73406c7dc5c27b1334cbae50d7783f0f43 |
|
MD5 | cf3fb47dc07fff938eedb4d8a6d9a8b4 |
|
BLAKE2b-256 | ee4da046585b2a57890a062138f16089c25690575c22bfc49f9fda1ab5ca02d5 |
Hashes for acsylla-0.1.3a0-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c836d02461aa0af13b9074a51173ac4f5ace87a75132cda48071e58ea224b21b |
|
MD5 | 01cec4826406c096527bba8e34631d5d |
|
BLAKE2b-256 | fb706c86036dfbe4021df92ce5774de012d417f351562f16f8fd0144183f45df |
Hashes for acsylla-0.1.3a0-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd452089e4874c4a63e77b8712dfea3af82ef1fe5314a51f678b12e3aa9a4a15 |
|
MD5 | 4e680dc0add2b51af67d2381d97feb34 |
|
BLAKE2b-256 | 7a9be9b142edf866824ef5b6301e19cf9483b12dee91d1e7cbfacf206b4c76ff |