skip to navigation
skip to content

pg_proboscis 1.0.5

pg_pqueue based GreenTrunk (API) and DB-API 2.0 implementation for PostgreSQL

pg_proboscis is a pg_pqueue based driver for PostgreSQL. It provides a GreenTrunk and a DB-API 2.0 interface to PostgreSQL databases.

contents

  • postgresql.interface.proboscis.tracenull
  • postgresql.interface.proboscis.greentrunk
  • postgresql.interface.proboscis.dbapi2
  • postgresql.interface.proboscis.python
  • pb_python (console script for postgresql.interface.proboscis.python)

examples

Run a console with a connection:

$ pb_python -h localhost -U pgsql -d postgres
Python 2.5.1 (r251:54863, Dec  8 2007, 09:22:18)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
(SavingConsole)
>>> gtx
<postgresql.interface.proboscis.tracenull.GreenTrunk_Connection[pq://pgsql@localhost:5432/postgres] T.0>
>>>

Make a GreenTrunk connection manually:

>>> import postgresql.interface.proboscis.greentrunk as gt
>>> con = gt.connector(user = 'pgsql', host = 'localhost', port = 5432, database = 'postgres')
>>> c=con()

Make a DB-API 2.0 connection manually:

>>> import postgresql.interface.proboscis.dbapi2 as db
>>> c=db.connect(user = 'pgsql', host = 'localhost', port = 5432, database = 'postgres')

Notably, DSN strings are not directly supported. However, if you want connection strings, the postgresql.utility.client.iri module has means for parsing PQ IRIs and the postgresql.utility.client.dsn module has means for parsing DSNs.

File Type Py Version Uploaded on Size # downloads
pg_proboscis-1.0.5.tar.gz (md5) Source 2009-02-02 22:33:36 34KB 147

Log in to rate this package.