[Twisted-Python] question : Twistar
bino oetomo
bino at indoakses-online.com
Tue Jul 12 21:08:04 EDT 2011
Dear All ..
Base on a need, I need to build a JSON-RPC to Postgres "bridge".
For now, I try to take the ORM way, so I'm looking for ORM "engine" that
work well with Twisted and support for Postgres as it's backend.
First try I look into SqlAlchemy ... but there is a lot of talk that
SqlAlchemy did not work well with Twisted.
I found that Twistar have a support for postgres backend.
All sample script I found only look like this :
for MySQL driver
---Start----
from twisted.enterprise import adbapi
from twistar.registry import Registry
Registry.DBPOOL = adbapi.ConnectionPool('MySQLdb', user="twistar",
passwd="apass", db="twistar")
---Stop----
and I thing for postgres it will be like :
---Start----
from twisted.enterprise import adbapi
from twistar.registry import Registry
Registry.DBPOOL = adbapi.ConnectionPool('psycopg2', user="twistar",
passwd="apass", db="twistar")
---Stop----
Is that right ?
If So ... where to put the db server ip address (i.e : my Postgres
server is at 192.168.10.232) ?
Sincerely
-bino-
More information about the Twisted-Python
mailing list