RE: Python Postgresql complete guide

2018-08-23 Thread David Raymond
Looks good.

Having used psycopg2 a fair amount, here are some suggestions I have on extra 
things to cover or emphasize.


-Postgres specific things like remembering to "set search_path to blargh, 
public;" etc as needed before querying.

-An example case of cur.fetchone() returning None, or more importantly, showing 
the error you get when you forget about that case

-Using conn.set_session(isolation_level, readonly, deferrable, autocommit) to 
set up transaction behavior at the start. (Can restrict to setting only the 
ones you care about by using keyword args)

-Going over some of the various caveats of autocommit on vs off
--autocommit on mode still allows transactions and rollbacks when you 
explicitly start a transaction with a cur.execute("begin;")
--To end an explicit autocomit transaction you need to use 
cur.execute("commit;") or cur.execute("rollback;"), you can't use conn.commit() 
or conn.rollback()
--With autocommit off you'll have to make sure you've run rollback or commit to 
use some commands which "cannot be run inside a transaction block" such as 
vacuum
--Autocommit off starts a transaction for any query, and will leave the 
transaction open until you commit it or roll it back. Thus if you run a simple 
select, then walk away for 5 hours with your connection still connected, you'll 
have left a transaction open on the server the whole time.

-Server side cursors: Running a select query that will result in 4 GB of data? 
With a "normal" cursor, even when iterating over the cursor or using fetchmany 
it will try to download the entire result set first before iterating over the 
results. (Actually, the .execute() statement will fetch everything even before 
you get a chance to run any of the .fetchone/many/all methods) Using a server 
side cursor will let you get it in chunks rather than trying to load it all 
into memory first.
--Server side cursors require autocommit off

-Enabling unicode for Python2.x so you get already decoded unicode objects back 
for text, not byte strings.
psycopg2.extensions.register_type(psycopg2.extensions.UNICODE)
psycopg2.extensions.register_type(psycopg2.extensions.UNICODEARRAY)



-Original Message-
From: Python-list 
[mailto:python-list-bounces+david.raymond=tomtom@python.org] On Behalf Of 
vishalhul...@gmail.com
Sent: Thursday, August 23, 2018 8:59 AM
To: python-list@python.org
Subject: Python Postgresql complete guide


https://pynative.com/python-postgresql-tutorial/

I have added table of content at the start of the article

This tutorial mainly focuses on installing Psycopg2 and use its API to access 
the PostgreSQL database. It then takes you through data insertion, data 
retrieval, data update and data deletion, transaction management, connection 
pooling and error-handling techniques to develop robust python programs with 
PostgreSQL.
-- 
https://mail.python.org/mailman/listinfo/python-list
-- 
https://mail.python.org/mailman/listinfo/python-list


Python Postgresql complete guide

2018-08-23 Thread vishalhule24


https://pynative.com/python-postgresql-tutorial/

I have added table of content at the start of the article

This tutorial mainly focuses on installing Psycopg2 and use its API to access 
the PostgreSQL database. It then takes you through data insertion, data 
retrieval, data update and data deletion, transaction management, connection 
pooling and error-handling techniques to develop robust python programs with 
PostgreSQL.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python + PostgreSQL

2009-03-19 Thread Martin v. Löwis
> I saw in a different post that psycopg2 does work on Python 3.x as
> long as a patch is applied (by Martin v. Löwis):
> 
[...]
> Do you know where can I find this patch

It's linked in

http://wiki.python.org/moin/Early2to3Migrations

and lives in

http://www.dcl.hpi.uni-potsdam.de/home/loewis/psycopg_3k_v2.diff
(or perhaps a later version should I need to apply more fixes)

> and if it does fully solve
> any incompatibility issues to be able to use Python 3.x without
> problems?.

I think it should resolve all issues for psycopg2. If you find issues,
I would certainly like to know.

Of course, it does not magically resolve *all* problems that you
might have with Python 3.x.

Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list


Re: Python + PostgreSQL

2009-03-17 Thread Jeroen Ruigrok van der Werven
-On [20090318 04:01], Lobo (carlosgali...@gmail.com) wrote:
>I am wondering whether I can jump directly to Python 3.x (instead of
>using Python 2.6), depending of course on psycopg2 compatibility?.

Might I suggest sticking to 2.6 for now?

The 2.x series is what is now going around as 'stable' in the Python world.
Almost all third-party modules are written for 2.x (typically 2.3 or 2.4 and
higher). 3.0 is very new and the documentation and modules are not just up
to the standard of the 2.x series.

Using 3.0 right now will get you little added benefit at this point in time.

Also, chalk up my preference for SQLAlchemy.

-- 
Jeroen Ruigrok van der Werven  / asmodai
イェルーン ラウフロック ヴァン デル ウェルヴェン
http://www.in-nomine.org/ | http://www.rangaku.org/ | GPG: 2EAC625B
The thought of a moment is as fleeting as the memory of it intense...
--
http://mail.python.org/mailman/listinfo/python-list


RE: Python + PostgreSQL

2009-03-17 Thread Jeff Peck
Just thought I'd add that I've been using SQLAlchemy + Postgresql w/
psycopg2 driver with great success for a long time now. This is just a
preference, but I like using SQLAlchemy without the ORM. It has really good
support for basic low level stuff like defining tables, inserts and updates.
The big win for me has been the ease of moving apps between different
databases. I have had to do this several times, and the process is mostly
painless.


Jeff


-Original Message-
From: python-list-bounces+jpeck=fedex@python.org
[mailto:python-list-bounces+jpeck=fedex@python.org] On Behalf Of Philip
Semanchuk
Sent: Tuesday, March 17, 2009 10:24 PM
To: python-list (General)
Subject: Re: Python + PostgreSQL


On Mar 17, 2009, at 10:57 PM, Lobo wrote:

> Many thanks to all for your valuable input.
>
> I've done some research and I believe I will use (at least for now, to
> make it simple) psycopg2 module to connect Python to PostgreSQL.
>
> I am wondering whether I can jump directly to Python 3.x (instead of
> using Python 2.6), depending of course on psycopg2 compatibility?.


You can, but as you observed you'll be running a patched version of  
psycopg2. If this is the only extension module library you think  
you'll need in your project, then running Python 3.x is fine.  
Otherwise you might run into surprises when you find that there's a  
lot fewer extensions available for 3.x than for 2.x. That's changing,  
but it seems to be the state of the Python world today.

Case in point -- you said your project is a Web project, yes? Then  
whatever Web framework you use will need to have been ported to 3.x.  
At this point, I don't know if any of the major ones have been.


I know that as a new user you'd like to start using the latest &  
greatest version of Python so that you don't put your project in a  
position where you know you'll have to upgrade at some point in the  
future, but that's probably your best course of action at the moment.

Good luck
Philip




> I saw in a different post that psycopg2 does work on Python 3.x as
> long as a patch is applied (by Martin v. Löwis):
>
>
http://groups.google.com/group/comp.lang.python/tree/browse_frm/thread/56b7f
ca444a5aa5d/4064a307dca37686?rnum=1&q=python3+postgresql&_done=%2Fgroup%2Fco
mp.lang.python%2Fbrowse_frm%2Fthread%2F56b7fca444a5aa5d%2Fc4f74719f6694dce%3
Flnk%3Dgst%26q%3Dpython3%2Bpostgresql%26#doc_29389da8b2b83188
>
> Do you know where can I find this patch, and if it does fully solve
> any incompatibility issues to be able to use Python 3.x without
> problems?.
>
> Or should I just use Python 2.6?.
>
> What would you recommend?.
>
> Many thanks again,
>
>   Carlos
>
> On Mar 17, 12:20 pm, Philip Semanchuk  wrote:
>> On Mar 17, 2009, at 12:46 PM, Lobo wrote:
>>
>>> Hi,
>>
>>> I am new to this newsgroup (and new to Python and PostgreSQL). My
>>> experience (17+ years) has been with Smalltalk (e.g. VAST) and  
>>> Object
>>> databases (e.g. Versant, OmniBase).
>>
>>> I now have a new project to develop web applications using the  
>>> latest/
>>> best possible versions of Python (3.x?) with PostgreSQL (8.x?, with
>>> pgAdmin 1.10?).
>>
>>> I hope to get some hints as of what frameworks/modules to use for  
>>> this
>>> specific combination (Python + PostgreSQL)?, should I use django,
>>> zope, web2py, psycopg module, others?, what are their pros/cons?.
>>
>> Hi Carlos,
>> You'll find a lot of libraries and projects aren't supporting Python
>> 3.x yet. Consider (as others have suggested) working in Python 2.6 to
>> ease the transition to 3.x when you & your libs are ready.
>>
>> I've used Psycopg2 to talk to Postgres from Python and had great
>> success with it.
>>
>> As far as Django versus Zope versus web2py versus Pylons versus
>> TurboGears versus...  Well, there's enough flamewar material in there
>> to power New York for centuries. They've all got their strengths and
>> weaknesses. I know which I prefer but my needs and preferences are my
>> own and only you know yours.
>>
>> One thing I will note is that Zope's database is an object hierarchy
>> which sounds like a familiar tool for you, so that might ease your
>> transition into the Python world.
>>
>> Good luck
>> Philip
>
> --
> http://mail.python.org/mailman/listinfo/python-list

--
http://mail.python.org/mailman/listinfo/python-list

--
http://mail.python.org/mailman/listinfo/python-list


Re: Python + PostgreSQL

2009-03-17 Thread Philip Semanchuk


On Mar 17, 2009, at 10:57 PM, Lobo wrote:


Many thanks to all for your valuable input.

I've done some research and I believe I will use (at least for now, to
make it simple) psycopg2 module to connect Python to PostgreSQL.

I am wondering whether I can jump directly to Python 3.x (instead of
using Python 2.6), depending of course on psycopg2 compatibility?.



You can, but as you observed you'll be running a patched version of  
psycopg2. If this is the only extension module library you think  
you'll need in your project, then running Python 3.x is fine.  
Otherwise you might run into surprises when you find that there's a  
lot fewer extensions available for 3.x than for 2.x. That's changing,  
but it seems to be the state of the Python world today.


Case in point -- you said your project is a Web project, yes? Then  
whatever Web framework you use will need to have been ported to 3.x.  
At this point, I don't know if any of the major ones have been.



I know that as a new user you'd like to start using the latest &  
greatest version of Python so that you don't put your project in a  
position where you know you'll have to upgrade at some point in the  
future, but that's probably your best course of action at the moment.


Good luck
Philip





I saw in a different post that psycopg2 does work on Python 3.x as
long as a patch is applied (by Martin v. Löwis):

http://groups.google.com/group/comp.lang.python/tree/browse_frm/thread/56b7fca444a5aa5d/4064a307dca37686?rnum=1&q=python3+postgresql&_done=%2Fgroup%2Fcomp.lang.python%2Fbrowse_frm%2Fthread%2F56b7fca444a5aa5d%2Fc4f74719f6694dce%3Flnk%3Dgst%26q%3Dpython3%2Bpostgresql%26#doc_29389da8b2b83188

Do you know where can I find this patch, and if it does fully solve
any incompatibility issues to be able to use Python 3.x without
problems?.

Or should I just use Python 2.6?.

What would you recommend?.

Many thanks again,

  Carlos

On Mar 17, 12:20 pm, Philip Semanchuk  wrote:

On Mar 17, 2009, at 12:46 PM, Lobo wrote:


Hi,



I am new to this newsgroup (and new to Python and PostgreSQL). My
experience (17+ years) has been with Smalltalk (e.g. VAST) and  
Object

databases (e.g. Versant, OmniBase).


I now have a new project to develop web applications using the  
latest/

best possible versions of Python (3.x?) with PostgreSQL (8.x?, with
pgAdmin 1.10?).


I hope to get some hints as of what frameworks/modules to use for  
this

specific combination (Python + PostgreSQL)?, should I use django,
zope, web2py, psycopg module, others?, what are their pros/cons?.


Hi Carlos,
You'll find a lot of libraries and projects aren't supporting Python
3.x yet. Consider (as others have suggested) working in Python 2.6 to
ease the transition to 3.x when you & your libs are ready.

I've used Psycopg2 to talk to Postgres from Python and had great
success with it.

As far as Django versus Zope versus web2py versus Pylons versus
TurboGears versus...  Well, there's enough flamewar material in there
to power New York for centuries. They've all got their strengths and
weaknesses. I know which I prefer but my needs and preferences are my
own and only you know yours.

One thing I will note is that Zope's database is an object hierarchy
which sounds like a familiar tool for you, so that might ease your
transition into the Python world.

Good luck
Philip


--
http://mail.python.org/mailman/listinfo/python-list


--
http://mail.python.org/mailman/listinfo/python-list


Re: Python + PostgreSQL

2009-03-17 Thread Lobo
Many thanks to all for your valuable input.

I've done some research and I believe I will use (at least for now, to
make it simple) psycopg2 module to connect Python to PostgreSQL.

I am wondering whether I can jump directly to Python 3.x (instead of
using Python 2.6), depending of course on psycopg2 compatibility?.

I saw in a different post that psycopg2 does work on Python 3.x as
long as a patch is applied (by Martin v. Löwis):

http://groups.google.com/group/comp.lang.python/tree/browse_frm/thread/56b7fca444a5aa5d/4064a307dca37686?rnum=1&q=python3+postgresql&_done=%2Fgroup%2Fcomp.lang.python%2Fbrowse_frm%2Fthread%2F56b7fca444a5aa5d%2Fc4f74719f6694dce%3Flnk%3Dgst%26q%3Dpython3%2Bpostgresql%26#doc_29389da8b2b83188

Do you know where can I find this patch, and if it does fully solve
any incompatibility issues to be able to use Python 3.x without
problems?.

Or should I just use Python 2.6?.

What would you recommend?.

Many thanks again,

   Carlos

On Mar 17, 12:20 pm, Philip Semanchuk  wrote:
> On Mar 17, 2009, at 12:46 PM, Lobo wrote:
>
> > Hi,
>
> > I am new to this newsgroup (and new to Python and PostgreSQL). My
> > experience (17+ years) has been with Smalltalk (e.g. VAST) and Object
> > databases (e.g. Versant, OmniBase).
>
> > I now have a new project to develop web applications using the latest/
> > best possible versions of Python (3.x?) with PostgreSQL (8.x?, with
> > pgAdmin 1.10?).
>
> > I hope to get some hints as of what frameworks/modules to use for this
> > specific combination (Python + PostgreSQL)?, should I use django,
> > zope, web2py, psycopg module, others?, what are their pros/cons?.
>
> Hi Carlos,
> You'll find a lot of libraries and projects aren't supporting Python  
> 3.x yet. Consider (as others have suggested) working in Python 2.6 to  
> ease the transition to 3.x when you & your libs are ready.
>
> I've used Psycopg2 to talk to Postgres from Python and had great  
> success with it.
>
> As far as Django versus Zope versus web2py versus Pylons versus  
> TurboGears versus...  Well, there's enough flamewar material in there  
> to power New York for centuries. They've all got their strengths and  
> weaknesses. I know which I prefer but my needs and preferences are my  
> own and only you know yours.
>
> One thing I will note is that Zope's database is an object hierarchy  
> which sounds like a familiar tool for you, so that might ease your  
> transition into the Python world.
>
> Good luck
> Philip

--
http://mail.python.org/mailman/listinfo/python-list


Re: Python + PostgreSQL

2009-03-17 Thread Philip Semanchuk


On Mar 17, 2009, at 12:46 PM, Lobo wrote:


Hi,

I am new to this newsgroup (and new to Python and PostgreSQL). My
experience (17+ years) has been with Smalltalk (e.g. VAST) and Object
databases (e.g. Versant, OmniBase).

I now have a new project to develop web applications using the latest/
best possible versions of Python (3.x?) with PostgreSQL (8.x?, with
pgAdmin 1.10?).

I hope to get some hints as of what frameworks/modules to use for this
specific combination (Python + PostgreSQL)?, should I use django,
zope, web2py, psycopg module, others?, what are their pros/cons?.


Hi Carlos,
You'll find a lot of libraries and projects aren't supporting Python  
3.x yet. Consider (as others have suggested) working in Python 2.6 to  
ease the transition to 3.x when you & your libs are ready.


I've used Psycopg2 to talk to Postgres from Python and had great  
success with it.


As far as Django versus Zope versus web2py versus Pylons versus  
TurboGears versus...  Well, there's enough flamewar material in there  
to power New York for centuries. They've all got their strengths and  
weaknesses. I know which I prefer but my needs and preferences are my  
own and only you know yours.


One thing I will note is that Zope's database is an object hierarchy  
which sounds like a familiar tool for you, so that might ease your  
transition into the Python world.



Good luck
Philip
--
http://mail.python.org/mailman/listinfo/python-list


Re: Python + PostgreSQL

2009-03-17 Thread Marco Mariani

Lobo wrote:


I now have a new project to develop web applications using the latest/
best possible versions of Python (3.x?) with PostgreSQL (8.x?, with
pgAdmin 1.10?).


You want to use Python 2.5.x (or 2.6 if your framework of choice already 
supports it), Postgres 8.3 and have a look at SQLAlchemy (please do).


As for the framework of choice, "it depends" :)
--
http://mail.python.org/mailman/listinfo/python-list


Re: Python + PostgreSQL

2009-03-17 Thread Krishnakant
hello,

On Tue, 2009-03-17 at 09:46 -0700, Lobo wrote:
> Hi,
> 
> I am new to this newsgroup (and new to Python and PostgreSQL). My
> experience (17+ years) has been with Smalltalk (e.g. VAST) and Object
> databases (e.g. Versant, OmniBase).
> 
Welcome to the world of monty pythons,
/\/\/\:

> I now have a new project to develop web applications using the latest/
> best possible versions of Python (3.x?) with PostgreSQL (8.x?, with
> pgAdmin 1.10?).
> 
It is still a better option to go with python 2.x latest releases IMHO.

> I hope to get some hints as of what frameworks/modules to use for this
> specific combination (Python + PostgreSQL)?, should I use django,
> zope, web2py, psycopg module, others?, what are their pros/cons?.
> 
With regards the web apps, zope is the best server I ever saw in my 10
years of II.T curier.

Python-psycopg2 is the most commonly used DBAPI implementations for
postgresql.

happy hacking.
Krishnakant.


--
http://mail.python.org/mailman/listinfo/python-list


Python + PostgreSQL

2009-03-17 Thread Lobo
Hi,

I am new to this newsgroup (and new to Python and PostgreSQL). My
experience (17+ years) has been with Smalltalk (e.g. VAST) and Object
databases (e.g. Versant, OmniBase).

I now have a new project to develop web applications using the latest/
best possible versions of Python (3.x?) with PostgreSQL (8.x?, with
pgAdmin 1.10?).

I hope to get some hints as of what frameworks/modules to use for this
specific combination (Python + PostgreSQL)?, should I use django,
zope, web2py, psycopg module, others?, what are their pros/cons?.

Your help is greatly appreciated - thanks !

Carlos
--
http://mail.python.org/mailman/listinfo/python-list


Re: Python, PostgreSQL, What next?

2006-12-02 Thread vbgunz
I need to thank you all for your suggestions and recommendations. I am
ultimately aiming to work in Python, PostgreSQL and Django and this
link http://www.sqlalchemy.org/news.myt#item_3 sort of made my day :)

I really appreciate all of your feedback and will go through Fredrik's
links as soon as I get the chance. I thank you all again, I appreciate
it very much!

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python, PostgreSQL, What next?

2006-12-02 Thread jim-on-linux

Before commiting to a RDBMS take a look at Gadfly. 

Depending on what you need a RDB for,
(light duty), or (heavy duty) take a look at 
gadfly.  Gadfly is made from all python code.

Use stardard SQL statements like Select, Create 
and Drop Tables, etc. 

Newest version GadflyB5 
http://gadfly.sourceforge.net/

jim-on-linux
http://www.inqvista.com




On Saturday 02 December 2006 11:33, Thomas Bartkus 
wrote:
> On Fri, 01 Dec 2006 23:04:37 -0800, vbgunz 
wrote:
> > Hello all,
> >
> > I've studied Python and studied PostgreSQL.
> > What is the absolute next best step to take
> > to merge these two finely together? I've
> > heard of SQLAlchemy and some others but
> > before I dive in, I would really like the
> > opinion of those who tried it and other
> > toolkits.
> >
> > My main concern is, I would like to
> > completely work with a database from Python.
> > What would you suggest I look into?
>
> Let me venture that the biggest problem most
> people seem to have is that they endure great
> pain just to avoid learning SQL. SQL is a
> complete programming language in and of itself
> with a breadth and depth that most people miss.
>  And it covers much terrain missed by Python.
> Which is a good thing because SQL and Python
> are perfect together.  With this language mix
> you've got darn near everything licked.
>
> Get SQL in your head and all you will need
> would be the db-api interface with Postgres
> that Frederick Lundh pointed you to.  All you
> want to do is throw SQL commands at Postgres
> and recover result sets into Python.
>
> It's a cinch.
> Thomas Bartkus
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python, PostgreSQL, What next?

2006-12-02 Thread Thomas Bartkus
On Fri, 01 Dec 2006 23:04:37 -0800, vbgunz wrote:

> Hello all,
> 
> I've studied Python and studied PostgreSQL. What is the absolute next
> best step to take to merge these two finely together? I've heard of
> SQLAlchemy and some others but before I dive in, I would really like
> the opinion of those who tried it and other toolkits.
> 
> My main concern is, I would like to completely work with a database
> from Python. What would you suggest I look into?

Let me venture that the biggest problem most people seem to have is that
they endure great pain just to avoid learning SQL. SQL is a complete
programming language in and of itself with a breadth and depth that most
people miss.  And it covers much terrain missed by Python. Which is a good
thing because SQL and Python are perfect together.  With this language mix
you've got darn near everything licked.

Get SQL in your head and all you will need would be the db-api interface
with Postgres that Frederick Lundh pointed you to.  All you want to do is
throw SQL commands at Postgres and recover result sets into Python.

It's a cinch.
Thomas Bartkus



-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python, PostgreSQL, What next?

2006-12-02 Thread Fredrik Lundh
vbgunz wrote:

> I've studied Python and studied PostgreSQL. What is the absolute next
> best step to take to merge these two finely together?

the db-api interface:

   http://www.python.org/dev/peps/pep-0249/

db-api compliant postgresql adapters:

   http://www.pygresql.org/
   http://www.initd.org/

higher-level interfaces for postgresql and other db-api compliant drivers:

   http://www.sqlobject.org/
   http://www.sqlalchemy.org/
   http://www.djangoproject.com/documentation/db_api/
   etc.



-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python, PostgreSQL, What next?

2006-12-02 Thread patkinson
Hi,
Look at DJANGO;-)
http://www.djangoproject.com/
http://www.djangobook.com/

Regards
Peter Atkinson



vbgunz ha escrito:

> Hello all,
>
> I've studied Python and studied PostgreSQL. What is the absolute next
> best step to take to merge these two finely together? I've heard of
> SQLAlchemy and some others but before I dive in, I would really like
> the opinion of those who tried it and other toolkits.
>
> My main concern is, I would like to completely work with a database
> from Python. What would you suggest I look into?
> 
> Thank you for your time!

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python, PostgreSQL, What next?

2006-12-02 Thread Armin
 
> I've studied Python and studied PostgreSQL. 
Good.

>What is the absolute next best step to take to merge these two finely 
>together? I've heard of

Just download psycopg2. Python and PostgreSQL are a match made in heavan.

Make your connection, 
do querys, 
get data,
earn profits.

Object-Relational-Mappers are to direct SQL as phone sex is to the real 
thing.

Harald
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python, PostgreSQL, What next?

2006-12-01 Thread Godson

On 1 Dec 2006 23:04:37 -0800, vbgunz <[EMAIL PROTECTED]> wrote:


Hello all,

I've studied Python and studied PostgreSQL. What is the absolute next
best step to take to merge these two finely together? I've heard of
SQLAlchemy and some others but before I dive in, I would really like
the opinion of those who tried it and other toolkits.

My main concern is, I would like to completely work with a database
from Python. What would you suggest I look into?

Thank you for your time!

--
http://mail.python.org/mailman/listinfo/python-list



I am using psycopg 1.1.21 for interacting with postgresql, which proved to
be good for my need i guess django and  zope  also using psycopg for doing
things with postgresql, to get started with that, The following links could
be useful

http://initd.org/pub/software/psycopg/dbapi20programming.pdf


http://www.python.org/dev/peps/pep-0249/

Godson Gera
http://godson.auroinfo.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Python, PostgreSQL, What next?

2006-12-01 Thread vbgunz
Hello all,

I've studied Python and studied PostgreSQL. What is the absolute next
best step to take to merge these two finely together? I've heard of
SQLAlchemy and some others but before I dive in, I would really like
the opinion of those who tried it and other toolkits.

My main concern is, I would like to completely work with a database
from Python. What would you suggest I look into?

Thank you for your time!

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Tutorials for Python + PostgreSQL

2005-11-23 Thread Daniel Crespo
Hi

Use adodb for it. Also, adodb accepts mysql, mssql, oracle, access, ...

Anyway, It needs psycopg for accessing Postgres databases, but I
recommend to use adodb, specially if you plan to use conectivity with
other databases too, because the access to them is the same way. Of
course, there are some differences between databases, but I think adodb
can care about it :)

http://adodb.sourceforge.net/
http://stickpeople.com/projects/python/win-psycopg/

Daniel

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Tutorials for Python + PostgreSQL

2005-11-23 Thread projecktzero
Michele Simionato wrote:
> Steve:
> > I want to learn more about enterprise-level programming using Python
> > and PostgreSQL. From what I've searched, it seems that psycho is
> > interesting to improve runtime too. Do you have tutorials, articles and
> > tips to learn this combination? I've been working with PostgreSQL for 2
> > years, and with Python for 6 months.
> > Thank you,
>
> Since Psyco is meant to speedup Python code, whereas the psycopg
> adapter is
> C-coded, I strongly doubt you will get any improvement from the
> combination.
>
> Michele Simionato

I think he's referring to psycopg, a python postgre database adapter
http://initd.org/projects/psycopg1

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Tutorials for Python + PostgreSQL

2005-11-23 Thread Michele Simionato
Steve:
> I want to learn more about enterprise-level programming using Python
> and PostgreSQL. From what I've searched, it seems that psycho is
> interesting to improve runtime too. Do you have tutorials, articles and
> tips to learn this combination? I've been working with PostgreSQL for 2
> years, and with Python for 6 months.
> Thank you,

Since Psyco is meant to speedup Python code, whereas the psycopg
adapter is
C-coded, I strongly doubt you will get any improvement from the
combination. 

Michele Simionato

-- 
http://mail.python.org/mailman/listinfo/python-list


Tutorials for Python + PostgreSQL

2005-11-23 Thread Steve
I want to learn more about enterprise-level programming using Python
and PostgreSQL. From what I've searched, it seems that psycho is
interesting to improve runtime too. Do you have tutorials, articles and
tips to learn this combination? I've been working with PostgreSQL for 2
years, and with Python for 6 months.
Thank you,

-- 
http://mail.python.org/mailman/listinfo/python-list