PG/Python is an open-source initiative that enhances the Python interfaces to PostgreSQL with the aim of improving their functionality.
The frontend's code to connect to the database looks like this:
```
import postgresql.interface.proboscis.prime as pq
Con = pq.Connector(
user = 'root',
host = 'localhost',
port = 5432,
ssl = True, # Optional. Only set it to True if you want it.
database = 'pgsql',
)
# This creates a Connection *class*, it still needs to be instantiated.
C = Con()
```
After creating the connection, you can query the database. Here's an example:
```
Q = C.Query("SELECT * FROM pg_proc WHERE proname = $1")
P = Q('byteain')
for x in P:
print x
```
Your results may vary, but this query will select all rows from pg_proc where proname = 'byteain'. You can then manipulate that data however you'd like. The release notes for this version indicate that the API was stabilized, meaning you can expect fewer breaking changes. Additionally, many bugs were fixed and features were added. If you're looking for an easy-to-use Python interface for PostgreSQL, consider giving pg/python a try.
Version 1.0: N/A