pg/pythonpg/python is an open source project working toward the improvement of Python interfaces to PostgreSQL. | |
Download |
pg/python Ranking & Summary
Advertisement
- License:
- BSD License
- Price:
- FREE
- Publisher Name:
- pg/python project
- Publisher web site:
- http://python.projects.postgresql.org/project/pg_greentrunk.html
pg/python Tags
pg/python Description
pg/python is an open source project working toward the improvement of Python interfaces to PostgreSQL. pg/python is an open source project working toward the improvement of Python interfaces to PostgreSQL.Quick start:Fetch and Install pg_probosciseasy_install pg_proboscisConnect to a database with the frontendimport postgresql.interface.proboscis.prime as pqCon = 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()C# Let's query the database; your results may vary.Q = C.Query("SELECT * FROM pg_proc WHERE proname = $1")P = Q('byteain')for x in P: print x('byteain'::name, '11'::oid, '1'::int4, '12'::oid, False, False, True, False,'i'::char, '1'::int2, '17'::oid, '2275'::oidvector, None, 'byteain'::text,'-'::bytea, '{=X/pgsql}'::_aclitem)print type(x)(proname name, pronamespace oid, proowner int4, prolang oid, proisagg bool,prosecdef bool, proisstrict bool, proretset bool, provolatile char, pronargsint2, prorettype oid, proargtypes oidvector, proargnames _text, prosrc text,probin bytea, proacl _aclitem,)print repr(x)'byteain'::nameprint repr(x)'byteain'::namefor y in x: print repr(y)'byteain'::name'11'::oid'1'::int4'12'::oidFalseFalseTrueFalse'i'::char'1'::int2'17'::oid'2275'::oidvectorNone'byteain'::text'-'::bytea'{=X/pgsql}'::_aclitemprint x=X/pgsqlPlease be sure to see the documentation for more details.What's New in This Release:· The API was stabilized.· Many bugs were fixed and many features were completed.
pg/python Related Software