python-postgres/fe has 88 GitHub stars and 36 forks. GitHot measured 0 stars in 24 hours, 0 in 7 days, and 0 in 15 days. Last checked 2026-11-23 22:02 UTC. Last push 2026-11-01.
实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
关于
py-postgresql: Query a PostgreSQL database with Python 3 using the PQv3 protocol.
数据README.md
原文About
py-postgresql is a Python 3 package providing modules for working with PostgreSQL. Primarily, a high-level driver for querying databases.
While py-postgresql is still usable for many purposes, asyncpg and PostgREST are likely more suitable for most applications:
py-postgresql, currently, does not have direct support for high-level async interfaces provided by recent versions of Python. Future versions may change this.
Advisory
In v2.0, many, potentially breaking, changes are planned. If you have automated installations using PyPI, make sure that they specify a major version.
- Support for older versions of PostgreSQL and Python will be removed. This will allow the driver to defer version parsing fixing (https://github.com/python-postgres/fe/issues/109), and better prepare for future versions.
- The connection establishment strategy will be simplified to only performing one attempt.
sslmodeparameter should be considered deprecated. v1.4 will provide a new security parameter implyingsslmode=require. See (https://github.com/python-postgres/fe/issues/122) and (https://github.com/python-postgres/fe/issues/75). - StoredProcedure will be removed. See (https://github.com/python-postgres/fe/issues/80).
Installation
From PyPI using pip:
python3 -m pip install py-postgresql
From GitHub using a full clone:
git clone https://github.com/python-postgres/fe.git
cd fe
python3 ./setup.py install
Basic Usage
import postgresql
db = postgresql.open('pq://user:password@host:port/database')
get_table = db.prepare("SELECT * from information_schema.tables WHERE table_name = $1")
print(get_table("tables"))
# Streaming, in a transaction.
with db.xact():
for x in get_table.rows("tables"):
print(x)
REPL with connection bound to db builtin:
python3 -m postgresql.bin.pg_python -I 'pq://postgres@localhost:5423/postgres'
Documentation
Related
探索相关项目
加载中…