aiocassandra 1.0.1
pip install aiocassandra==1.0.1
Newer version available (2.0.1)
Released:
Simple threaded cassandra wrapper for asyncio
Navigation
Verified details
These details have been verified by PyPIOwner
Maintainers
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: MIT License
- Author: wikibusiness
Classifiers
- Development Status
- Intended Audience
- License
- Operating System
- Programming Language
Project description
- info:
Simple threaded cassandra wrapper for asyncio
Installation
pip install aiocassandra
Usage
import asyncio
from aiocassandra import aiosession
from cassandra.cluster import Cluster
cluster = Cluster()
session = cluster.connect()
# best way is to use cassandra prepared statements
cql = session.prepare('SELECT now() FROM system.local;')
@asyncio.coroutine
def main(*, loop):
# patches and adds `execute_future` to `cassandra.cluster.Session`
aiosession(session, loop=loop)
return (yield from session.execute_future(cql))
loop = asyncio.get_event_loop()
try:
response = loop.run_until_complete(main(loop=loop))
print(response)
finally:
cluster.shutdown()
loop.close()
Python 2.7(trollius), 3.3+ and PyPy are supported.
Project details
Verified details
These details have been verified by PyPIOwner
Maintainers
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: MIT License
- Author: wikibusiness
Classifiers
- Development Status
- Intended Audience
- License
- Operating System
- Programming Language
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
File details
Details for the file aiocassandra-1.0.1.tar.gz
.
File metadata
- Download URL: aiocassandra-1.0.1.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d159229a6ee15ee156d651e9659d9e3b232f10711afb6da0692952c7c09fa879 |
|
MD5 | d5ab85f1fba4cc02a4f598f0301b0402 |
|
BLAKE2b-256 | 658c7a04b3f8f0f1ccfce06a36d4bb45e6978d1de623baba719dfa0fdeae742d |