[web2py] Re: Cassandra and web2py

2017-09-30 Thread Massimo Di Pierro
You have db = cluster.connect('mykeyspace') which means that for you db is not a DAL() object but a Cassandra connection. You the pass it to auth = Auth(db) but here Auth(...) expects a DAL() object. On Friday, 22 September 2017 20:18:28 UTC-5, 黄祥 wrote: > > tryin to use cassandra with

[web2py] Re: Cassandra and web2py

2017-09-22 Thread 黄祥
tryin to use cassandra with web2py using cassandra-driver but return an error: e.g. *cassandra side* pip install cassandra-driver systemctl restart cassandra cqlsh cqlsh> show version [cqlsh 5.0.1 | Cassandra 3.11.0 | CQL spec 3.4.4 | Native protocol v4] cqlsh> CREATE KEYSPACE mykeyspace WITH

[web2py] Re: Cassandra and web2py

2017-05-23 Thread Nicolas Petitclerc
Sorry, it took me a while to test that out, but it works great! Thank you, that's exactly what I needed. I had to wrap my head around how cache works, but this tread help me out: https://groups.google.com/forum/#!topic/web2py/w1b5ZvO9JqY -- Resources: - http://web2py.com -

[web2py] Re: Cassandra and web2py

2017-04-05 Thread Massimo Di Pierro
I do not know cassandra well enough. You can use connection = cache.ram('cassandra', lambda: establish_connection(), None) so the connection is cached in ram. The DAL has pooling and works better but nobody wrote a cassandra adapter. Perhaps you could try that. On Wednesday, 29 March 2017

[web2py] Re: Cassandra and web2py

2017-03-29 Thread Nicolas Petitclerc
Hi, I'm using external Python driver (e.g., https://github.com/datastax/python-driver) to use Cassandra in web2py, but the issue I have is that I need to get a new Cassandra connection on every query (and this is quite slow, 2-3 sec). *So I wonder if there is a way to preserve a connection?*

[web2py] Re: Cassandra and web2py

2014-01-27 Thread Anthony
The DAL does not have a Cassandra adapter, so you'll have to use an external Python driver (e.g., https://github.com/datastax/python-driver). Anthony On Monday, January 27, 2014 1:55:03 AM UTC-5, Manoj bhupathiraju wrote: Any idea of how to link cassandra and web2py. Please reply ASAP

[web2py] Re: Cassandra and web2py

2014-01-27 Thread Alan Etkin
The DAL does not have a Cassandra adapter, so you'll have to use an external Python driver (e.g., https://github.com/datastax/python-driver). Or code your own adapter (and perhaps share it)