67 lines
2.1 KiB
Python
67 lines
2.1 KiB
Python
from setuptools import setup, find_packages
|
|
|
|
version = '0.1.0'
|
|
|
|
LONG_DESCRIPTION = """
|
|
cassandra-sessions
|
|
==================
|
|
|
|
This is a session backend for Django that stores sessions in Cassandra
|
|
|
|
The advantage to using this over other solutions is that your data is persistent
|
|
unlike memcached, and Cassandra is designed to store key-value data like
|
|
this, so performance is much closer to that of memcached than with a database.
|
|
|
|
Installing cassandra-sessions
|
|
-----------------------------
|
|
|
|
1. Either download the tarball and run ``python setup.py install``, or simply
|
|
use easy install or pip like so ``easy_install cassandra-sessions``.
|
|
|
|
|
|
2. Set ``cassandra-sessions`` as your session engine, like so::
|
|
|
|
SESSION_ENGINE = 'cassandra-sessions'
|
|
|
|
|
|
3. Add settings describing where to connect to Cassandra::
|
|
|
|
CASSANDRA_POOL = ('127.0.0.1:9160',)
|
|
CASSANDRA_SESSION_KEYSPACE = 'Testing'
|
|
|
|
|
|
4. Create the Keyspace and Column Family in Cassandra::
|
|
|
|
<Keyspace Name="Testing">
|
|
<ColumnFamily Name="Sessions" CompareWith="UTF8Type"/>
|
|
<ReplicaPlacementStrategy>org.apache.cassandra.locator.RackUnawareStrategy</ReplicaPlacementStrategy>
|
|
<ReplicationFactor>1</ReplicationFactor>
|
|
<EndPointSnitch>org.apache.cassandra.locator.EndPointSnitch</EndPointSnitch>
|
|
</Keyspace>
|
|
|
|
That's it. Hopefully this backend gives you all the better performance while
|
|
still not sacrificing persistence.
|
|
"""
|
|
|
|
setup(
|
|
name='cassandra-sessions',
|
|
version=version,
|
|
description="This is a session backend for Django that stores sessions in Cassandra.",
|
|
long_description=LONG_DESCRIPTION,
|
|
classifiers=[
|
|
"Programming Language :: Python",
|
|
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
"Framework :: Django",
|
|
"Environment :: Web Environment",
|
|
],
|
|
keywords='cassandra,session,lazyboy,django',
|
|
author='Ray Slakinski',
|
|
author_email='ray.slakinski@gmail.com',
|
|
url='http://github.com/rays/cassandra-sessions/tree/master',
|
|
license='BSD',
|
|
packages=find_packages(),
|
|
zip_safe=False,
|
|
install_requires=['setuptools'],
|
|
include_package_data=True,
|
|
setup_requires=['setuptools_git'],
|
|
) |