|
12 | 12 | LONG_DESCRIPTION = """ |
13 | 13 | py-postgresql is a set of Python modules providing interfaces to various parts |
14 | 14 | of PostgreSQL. Notably, it provides a driver for interacting with a database. |
15 | | -
|
16 | | -examples |
17 | | --------- |
18 | | -
|
19 | | -Run a console with a connection:: |
20 | | -
|
21 | | - $ pg_python -h localhost -U pgsql -d postgres |
22 | | - Python 2.5.1 (r251:54863, Dec 8 2007, 09:22:18) |
23 | | - [GCC 4.0.1 (Apple Inc. build 5465)] on darwin |
24 | | - Type "help", "copyright", "credits" or "license" for more information. |
25 | | - (SavingConsole) |
26 | | - >>> pg |
27 | | - <postgresql.driver.tracenull.PGAPI_Connection[pq://pgsql@localhost:5432/postgres] T.0> |
28 | | - >>> |
29 | | -
|
30 | | -Make a PG-API connection manually:: |
31 | | -
|
32 | | - >>> import postgresql.driver.pgapi as driver |
33 | | - >>> con = driver.Connector(user = 'pgsql', host = 'localhost', port = 5432, database = 'postgres') |
34 | | - >>> c=con() |
35 | | -
|
36 | | -Make a DB-API 2.0 connection manually:: |
37 | | -
|
38 | | - >>> import postgresql.driver.dbapi20 as db |
39 | | - >>> c=db.connect(user = 'pgsql', host = 'localhost', port = 5432, database = 'postgres') |
40 | | -
|
41 | | -Notably, DSN strings are *not* directly supported. However, if you want connection |
42 | | -strings, the ``postgresql.iri`` module has means for parsing PQ |
43 | | -RIs and the ``postgresql.dsn`` module has means for parsing DSNs. |
44 | 15 | """ |
45 | 16 |
|
46 | 17 | CLASSIFIERS = [ |
|
66 | 37 | 'maintainer' : 'pg/python project', |
67 | 38 | 'maintainer_email' : 'python-general@pgfoundry.org', |
68 | 39 | 'url' : 'http://python.projects.postgresql.org', |
69 | | - 'zip_safe' : True, |
70 | | - 'install_requires' : [ |
71 | | - 'py-termstyle >= 1.0', |
72 | | - 'py-python_command >= 1.0', |
73 | | - 'py-riparse >= 1.0', |
74 | | - ], |
75 | 40 | 'classifiers' : CLASSIFIERS, |
76 | 41 |
|
77 | | - 'namespace_packages' : [ |
78 | | - 'postgresql', |
79 | | - ], |
80 | | - |
81 | 42 | 'packages' : [ |
82 | 43 | 'postgresql', |
83 | 44 | 'postgresql.encodings', |
|
0 commit comments