Skip to main content

Python操作PostgreSQL

Project description

更新日志

  • 第一版
  • 添加数据时,表名称加入双引号,避免跟关键字冲突
  • getfv方法中也补充双引号,避免冲突
  • 修复BUG,fetchone返回None时不应该进行dict转换

连接PostgreSQL

from pgman import PostgreSQL

pg = PostgreSQL(db="test", user="wauo", password="123456")

name = "people"
pg.make_table(name)

res = pg.exe_sql("select * from people limit 10", query_all=True)
print(res)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pgman-0.0.4.tar.gz (3.9 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page