Skip to main content

Python操作PostgreSQL

Project description

更新日志

  • 第一版
  • 添加数据时,表名称加入双引号,避免跟关键字冲突
  • getfv方法中也补充双引号,避免冲突
  • 修复BUG,fetchone返回None时不应该进行dict转换
  • 工资的随机数进行向上取证,比如9800=10000、8278=8500
  • 工资的随机数最低为3000

连接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.6.tar.gz (4.0 kB view details)

Uploaded Source

File details

Details for the file pgman-0.0.6.tar.gz.

File metadata

  • Download URL: pgman-0.0.6.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.13

File hashes

Hashes for pgman-0.0.6.tar.gz
Algorithm Hash digest
SHA256 eb531918576d5c7b74bf266d2f61b3c763d3374068ff9e01fc8a876eb8a2338d
MD5 12d5032e1767a0facba6a38abef8c7a0
BLAKE2b-256 d0bf5a175cf0f97fb14032fb66362fa899317638030d9db543dd4fec5dd5c6d0

See more details on using hashes here.

Provenance

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