From: | James William Pye <x(at)jwp(dot)name> |
---|---|
To: | pgsql-announce(at)postgresql(dot)org |
Subject: | py-postgresql-0.8 for Python 3 Released: Was pg_proboscis |
Date: | 2009-04-04 00:50:14 |
Message-ID: | F323B5D7-B5B3-4906-A1FD-53BEDEF90E1A@jwp.name |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-announce |
I'm pleased to announce the release of py-postgresql 0.8. This release
marks months of work porting the 2.x code to Python 3 and making
numerous improvements. py-postgresql is a port of pg_proboscis-1.0 and
other projects under the "pg/python project umbrella". This release
simplifies the project structure by combining the smaller projects
into one easy-to-manage package.
http://python.projects.postgresql.org
Documentation:
http://python.projects.postgresql.org/docs/0.8
Source:
http://python.projects.postgresql.org/files/py-
postgresql-0.8.0.tar.gz
Win32 Installer:
http://python.projects.postgresql.org/files/py-postgresql-0.8.0.win32-py3.0.exe
Features:
* BSD/MIT/PSF Licensed.
* Documentation. =)
* Pure-Python + C optimizations. No need for libpq.
* Prepared Statement driven interface/native APIs. (DB-API 2.0 is here
too ;)
(PG-API, [Was: "pg_greentrunk"])
* Scrollable cursors with configurable direction for paging.
* COPY support. [iter(db.prepare("COPY table TO STDOUT"))]
* Windows support. We love you too. ;)
* pg_python quick console.
$ pg_python -h localhost -> Gives a Python prompt with a connection
bound to `db`.
* Support for most PostgreSQL types. (datetime.*, numeric->decimal,
and more)
* Composite Types and Arrays. Fully structured for easy access.
* Row-objects returned by cursors support
Mapping and Sequence interfaces. (row["colname"], row[0])
* Over 150 tests and counting!
Sample PG-API code via pg_python:
$ pg_python -h localhost -U postgres -d postgres
Backslash Commands:
\? Show this help message.
\E Edit a file or a temporary script.
\e Edit and Execute the file directly in the context.
\i Execute a Python script within the interpreter's context.
\set Configure environment variables. \set without arguments to
show all
\x Execute the Python command within this process.
Python 3.0.1+ (release30-maint:70204M, Mar 5 2009, 21:28:06)
Type "help", "copyright", "credits" or "license" for more information.
(ExtendedConsole)
>>> ps = db.prepare('select 1')
>>> ps()
[(1,)]
>>> ps.first()
1
>>> c = ps.declare()
>>> c.read()
[(1,)]
>>> c.seek(0)
>>> c.read()
[(1,)]
From | Date | Subject | |
---|---|---|---|
Next Message | David Fetter | 2009-04-06 06:28:31 | == PostgreSQL Weekly News - April 05 2009 == |
Previous Message | David Fetter | 2009-04-01 08:44:32 | == Postgres Weekly News - April 01 2009 == |