[web2py] Re: MongoDB and Web2py in Windows

2014-12-10 Thread Oliver
I tried binary version. It did not work. Im trying to subscribe to CouchDB or MongoDB online and test it instead running my db local machine. thanks for the help. On Friday, November 28, 2014 6:51:15 PM UTC-5, Massimo Di Pierro wrote: Are you using the source version of the binary version

[web2py] Re: MongoDB and Web2py in Windows

2014-12-10 Thread Massimo Di Pierro
Exactely. The binary version is not supposed to work. It comes with its own version of python therefore it does not see any module that you may have installed. If you want to use modules like pymongo you must install Python, install pymongo, AND run web2py source so it uses your own python

[web2py] Re: MongoDB and Web2py in Windows

2014-11-28 Thread Massimo Di Pierro
Are you using the source version of the binary version of web2py? The binary version comes his own python version. On Wednesday, 26 November 2014 09:42:56 UTC-6, Oliver wrote: Hi All, anyone have success using MongoDb in DAL? When I ran web2py, I don't see MongoDB listed. here is what I

[web2py] Re: mongodb and web2py

2011-12-03 Thread lyn2py
mongodb gets a lot of attention, has a fairly large userbase and even dedicated database hosting for scalability. They do a lot of marketing to expand their userbase from Rails to Django to PHP users are using it! I think it is fair that they want to work on the mongodb adapter. It will help

[web2py] Re: MongoDB and Web2py

2011-10-12 Thread Francisco Costa
we use the DAL for MySQL and pymongo for MongoDB We are changing everything to MongoDS, so we have some interest in being able to write MongoDB queries trough the DAL so we woulnd't have to change lots of code On Oct 3, 9:57 am, ~redShadow~ redsha...@hackzine.org wrote: On Sun, 2011-10-02 at

[web2py] Re: MongoDB and Web2py

2011-10-12 Thread David Marko
Hi Francisco, how do you manage the connection to MongoDB server? Do you establish and close connection on every request or do you use some connection pooling ?

[web2py] Re: MongoDB and Web2py

2011-10-12 Thread Francisco Costa
On Oct 12, 11:00 am, David Marko dma...@tiscali.cz wrote: Hi Francisco, how do you manage the connection to MongoDB server? Do you establish and close connection on every request or do you use some connection pooling ? Hi Marko, for now we are using pymongo like this: from pymongo import

[web2py] Re: MongoDB and Web2py

2011-10-12 Thread David Marko
Assume this code is in some db.py file ... so its executed on every request ...?

[web2py] Re: MongoDB and Web2py

2011-10-12 Thread Francisco Costa
we use it in db.py, not sure where should be the optimal way for it On Oct 12, 11:52 am, David Marko dma...@tiscali.cz wrote: Assume this code is in some db.py file ... so its executed on every request ...?

[web2py] Re: MongoDB and Web2py

2011-10-12 Thread David Marko
Massimo adviced me to use something like this previsously: def make_connection(): from pymongo import Connection connection = Connection('localhost', 27017) return connection connection = cache.ram('mongodb',make_connection,None) It seemed to work but I had no opportunity

[web2py] Re: MongoDB and Web2py

2011-10-12 Thread Tiago Moutinho
On Oct 12, 12:07 pm, David Marko dma...@tiscali.cz wrote: Massimo adviced me to use something like this previsously: def make_connection():      from pymongo import Connection      connection = Connection('localhost', 27017)      return connection connection =

[web2py] Re: MongoDB and Web2py

2011-10-12 Thread David Marko
Both can be in db.py file and so available for entire application = to other db_xx.py files and controlers ... the same thing as standard 'db' sql connection variable defined in db.py by default.

[web2py] Re: MongoDB and Web2py

2011-10-12 Thread Jay
Here is what I use (in a file models/0.py): import pymongo from pymongo import ASCENDING, DESCENDING def make_mongo_connection(): mdb = pymongo.Connection() return mdb mdb = cache.ram('mongodb', make_mongo_connection, 0) # in the code I use mdb as needed. # On a busy site, it may make

[web2py] Re: MongoDB and Web2py

2011-10-12 Thread David Marko
Shouldnt the cache.ram('mongodb', make_mongo_connection, 0) has the None instead of 0? Having 0 it doesnt work as a cache as it refreshes connection on each request ...

Re: [web2py] Re: MongoDB and Web2py

2011-10-12 Thread ~redShadow~
On Wed, 2011-10-12 at 04:07 -0700, David Marko wrote: Massimo adviced me to use something like this previsously: def make_connection(): from pymongo import Connection connection = Connection('localhost', 27017) return connection connection =

[web2py] Re: MongoDB and Web2py

2011-10-02 Thread Massimo Di Pierro
At this time my priority is to finish document the rest of undocumented web2py features. I will work on this as soon as I finish that. Anyway, in dal.py there is a mongodb adapter. It can only do insert. Has anybody tried that? massimo On Oct 2, 4:52 pm, Francisco Costa m...@franciscocosta.com

Re: [web2py] Re: MongoDB and Web2py

2011-10-02 Thread Bruno Rocha
I used that for some samples and talks, also for a small project. as I I am not doing advanced operations I cant say if it works or not. But for my sample needs worked very well. On Sun, Oct 2, 2011 at 7:39 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: At this time my priority is to

[web2py] Re: MongoDB and Web2py

2011-10-02 Thread Massimo Di Pierro
I am confused. Did you use db = DAL('mongodb://') db.define_table() db.mytable.insert() or just the mongodb api? On Oct 2, 5:53 pm, Bruno Rocha rochacbr...@gmail.com wrote: I used that for some samples and talks, also for a small project. as I I am not doing advanced operations I

[web2py] Re: MongoDb and web2py

2011-09-13 Thread dpreston
My understanding is that pymongo has connection pooling builtin. - http://api.mongodb.org/python/current/api/pymongo/connection.html Also, it appears that an addition to the cache method described by Massimo enables the use replica sets as well. You still need to handle AutoReconnect exceptions

[web2py] Re: MongoDb and web2py

2011-08-13 Thread Karthik
I'm still looking for a solution to simulate connection pooling, any responses would be great - thanks! On Jul 21, 4:53 pm, Karthik karthikparameswa...@gmail.com wrote: Hi Massimo, Thanks for this. Do you know if it will hold up in a high performance situation though? As in, if multiple

[web2py] Re: MongoDb and web2py

2011-07-21 Thread Karthik
Hi Massimo, Thanks for this. Do you know if it will hold up in a high performance situation though? As in, if multiple connections originate at the same time, won't there be a queue? Is it possible to simulate the connection pooling mechanism in web2py's DAL? Thanks, Karthik On Jul 31 2010,

Re: [web2py] Re: MongoDB and Web2Py

2011-04-04 Thread Ahmed Bani
I will test it for my new application: x2py = a web2py-powered web-based email client. Yet, another web-based email client!

[web2py] Re: MongoDB and Web2Py

2011-04-04 Thread Massimo Di Pierro
DAL allows to do: db=DAL('mongodb://127.0.0.1:5984/db') it allows to define_table and allows db.table.insert(...) other methods have not been implemented because the above was never tested. If you help us with testing I can implement the other methods (select, count, update). On Apr 1, 9:55 am,

Re: [web2py] Re: MongoDB and Web2Py

2011-04-04 Thread David J.
Thanks Massimo; I never thought to even try this; I will make a sample project and test this; (For me the other way works; so I wouldn't ask that you implement it in DAL; (but I am happy to test it;) Thanks for your great software. David. On 4/4/11 9:24 AM, Massimo Di Pierro wrote:

[web2py] Re: MongoDB and Web2Py

2011-04-04 Thread Massimo Di Pierro
If it is an option you may want to try with couchdb. That is very close to completed. Only date/datetime/time/boolean fields do not work. On Apr 4, 10:37 am, David J. da...@styleflare.com wrote: Thanks Massimo; I never thought to even try this; I will make a sample project and test this;

Re: [web2py] Re: MongoDB and Web2Py

2011-04-01 Thread Tom Atkins
+1 On 1 April 2011 06:35, David Marko dma...@tiscali.cz wrote: I'm also interested in testing ... David Marko

[web2py] Re: MongoDB and Web2Py

2011-04-01 Thread Moritz Pein
I'd also like to help with web2py+mongodb.

[web2py] Re: MongoDB and Web2Py

2011-04-01 Thread Marcel Luethi
Despite a lot of time, I'd like to help as well. MongoDB looks promising. On 1 Apr., 04:58, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Lots of people asked for support but nobody volunteered to help test it. If you are interested and can help with some regular tests we can make it

Re: [web2py] Re: MongoDB and Web2Py

2011-04-01 Thread David J.
While DAL might not support MongDB; you can still use it via mongoengine; On 4/1/11 10:41 AM, Marcel Luethi wrote: Despite a lot of time, I'd like to help as well. MongoDB looks promising. On 1 Apr., 04:58, Massimo Di Pierromassimo.dipie...@gmail.com wrote: Lots of people asked for

[web2py] Re: MongoDB and Web2Py

2011-03-31 Thread Massimo Di Pierro
Lots of people asked for support but nobody volunteered to help test it. If you are interested and can help with some regular tests we can make it work in relatively short time. Massimo On Mar 31, 9:09 pm, luckysmack luckysm...@gmail.com wrote: I have read a few older messages about mongoDB

[web2py] Re: MongoDB and Web2Py

2011-03-31 Thread luckysmack
Alright. Well im still learning web2py, so in a couple weeks when i feel confident enough (im already familiar with mongo) ill drop another line here. I was just curious as to what was done so i knew if there was some where I could start. On Mar 31, 7:58 pm, Massimo Di Pierro

[web2py] Re: MongoDB and Web2Py

2011-03-31 Thread David Marko
I'm also interested in testing ... David Marko

[web2py] Re: MongoDb and web2py

2010-07-31 Thread mdipierro
yes. Just set dbio=False in forms and do your own mymongo IO after accepts: On Jul 30, 11:18 am, Amit Ambardekar amit...@gmail.com wrote: I want to use web2py with pymongo. I don't need ORM or or anything. I just want to connect use pymongo from Web2Py. How can I use it inside web2py. I need

[web2py] Re: MongoDb and web2py

2010-07-31 Thread David Marko
Hi Massimo, can you give ua a hint how to impelement persistent connection in web2py for pyMongo? PyMongo requires database connection and to use it efficiently the connection has to be persistent and shared among requests like a connection pool for database connections as DAL has. But how to do

[web2py] Re: MongoDb and web2py

2010-07-31 Thread mdipierro
how about this? (None below means cache forever) def make_connection(): from pymongo import Connection connection = Connection('localhost', 27017) return connection connection = cache.ram('mongodb',make_connection,None) On Jul 31, 3:11 am, David Marko dma...@tiscali.cz wrote: Hi