Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Bottle plugin for Cassandra/Pycassa

Project Description

bottle-pycassa
==============

Plugin for bottle to allow for cassandra connection pools

Usage example:
```
import bottle
from bottle import run, get
from bottle import HTTPError
from bottle.ext import pycassa
from pycassa.pool import ConnectionPool
from pycassa.columnfamily import ColumnFamily
from pycassa import NotFoundException

pool = ConnectionPool("my_keyspace",
['127.0.0.1'],
pool_timeout = 5, pool_size=24)

app = bottle.Bottle()
plugin = pycassa.Plugin(pool, keyword="cass")
app.install(plugin)


@app.get('/:query')
def show(query, cass):
my_column_family = ColumnFamily(cass, 'my_column_family')

try:
result = my_column_family.get(1167864277)
return result
except NotFoundException, nfe:
return HTTPError(404, 'Entity not found.')

run(app=app, host='localhost', port=80, reloader=True)

Release History

This version
History Node

0.1

Download Files

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

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
bottle-pycassa-0.1.tar.gz
(2.8 kB) Copy SHA256 Hash SHA256
Source None Nov 15, 2012

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting