Skip to main content

wechat database manager.

Project description

wxdb

安装

pip install wxdb

代码示例

from wxdb import get_wx_db

wx_db = get_wx_db()
conn = wx_db.connect(r"Msg\Multi\MSG0.db")
with conn:
    print(conn.execute("SELECT * FROM sqlite_master;").fetchall())
# 输出
# [('table', 'MSG', 'MSG', 2, 'CREATE TABLE MSG (localId INTEGER PRIMARY KEY AUTOINCREMENT,TalkerId INT DEFAULT 0,MsgSvrID INT,Type INT,SubType INT,IsSender INT,CreateTime INT,Sequence INT DEFAULT 0,StatusEx INT DEFAULT 0,FlagEx INT,Status INT,MsgServerSeq INT,MsgSequence INT,StrTalker TEXT,StrContent TEXT,DisplayContent TEXT,Reserved0 INT DEFAULT 0,Reserved1 INT DEFAULT 0,Reserved2 INT DEFAULT 0,Reserved3 INT DEFAULT 0,Reserved4 TEXT,Reserved5 TEXT,Reserved6 TEXT,CompressContent BLOB,BytesExtra BLOB,BytesTrans BLOB)'), ('table', 'sqlite_sequence', 'sqlite_sequence', 3, 'CREATE TABLE sqlite_sequence(name,seq)'), ('table', 'MSGTrans', 'MSGTrans', 4, 'CREATE TABLE MSGTrans(msgLocalId INTEGER PRIMARY KEY, talkerId INT)'), ('index', 'talkerIDIdx', 'MSGTrans', 5, 'CREATE INDEX talkerIDIdx ON MSGTrans(talkerId)'), ('index', 'MsgTalkerIdSeqIndex', 'MSG', 6, 'CREATE INDEX MsgTalkerIdSeqIndex ON MSG(talkerId,sequence DESC)'), ('index', 'MsgTalkerIdTypeSeqIndex', 'MSG', 7, 'CREATE INDEX MsgTalkerIdTypeSeqIndex ON MSG(talkerId,type,sequence DESC)'), ('index', 'SvrIdIndex', 'MSG', 8, 'CREATE INDEX SvrIdIndex ON MSG(MsgSvrID)'), ('table', 'Name2ID', 'Name2ID', 9, 'CREATE TABLE Name2ID(UsrName TEXT PRIMARY KEY)'), ('index', 'sqlite_autoindex_Name2ID_1', 'Name2ID', 10, None), ('table', 'DBInfo', 'DBInfo', 11, 'CREATE TABLE DBInfo (\t\t\t\t\t\t\ttableIndex INTEGER PRIMARY KEY,\t\t\t\t\t\t\ttableVersion INTERGER,\t\t\t\t\t\t\ttableDesc TEXT)'), ('index', 'versionIdx', 'DBInfo', 12, 'CREATE INDEX versionIdx ON DBInfo(tableIndex)')]

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

wxdb-0.0.1.tar.gz (1.0 MB view details)

Uploaded Source

File details

Details for the file wxdb-0.0.1.tar.gz.

File metadata

  • Download URL: wxdb-0.0.1.tar.gz
  • Upload date:
  • Size: 1.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for wxdb-0.0.1.tar.gz
Algorithm Hash digest
SHA256 48cdf0ce9bfb04ec22d0da5f108bf352f01c0ec281c719bfed27dca293e59e84
MD5 42a8b02e0ea3877a686e442e23246df5
BLAKE2b-256 8bbf064650c9e9236c8a66644cc0291063844f4b41d7ed85344eac81eb1b6443

See more details on using hashes here.

Supported by

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