Rename package
This commit is contained in:
parent
708725ee9e
commit
e8e687ec92
@ -5,7 +5,7 @@ import logging
|
|||||||
import signal
|
import signal
|
||||||
from time import sleep
|
from time import sleep
|
||||||
|
|
||||||
from wcf.client import Wcf
|
from wcferry import Wcf
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
4
python/wcferry/__init__.py
Normal file
4
python/wcferry/__init__.py
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
from .client import Wcf
|
||||||
|
from .client import __version__
|
@ -9,7 +9,7 @@ import re
|
|||||||
import sys
|
import sys
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
from time import sleep
|
from time import sleep
|
||||||
from typing import Any, List, Callable, Optional
|
from typing import List, Callable, Optional
|
||||||
|
|
||||||
import grpc
|
import grpc
|
||||||
|
|
||||||
@ -18,6 +18,8 @@ sys.path.insert(0, WCF_ROOT)
|
|||||||
import wcf_pb2 # noqa
|
import wcf_pb2 # noqa
|
||||||
import wcf_pb2_grpc # noqa
|
import wcf_pb2_grpc # noqa
|
||||||
|
|
||||||
|
__version__ = "v3.7.0.30-11"
|
||||||
|
|
||||||
|
|
||||||
class Wcf():
|
class Wcf():
|
||||||
"""WeChatFerry, a tool to play WeChat."""
|
"""WeChatFerry, a tool to play WeChat."""
|
||||||
@ -182,7 +184,7 @@ class Wcf():
|
|||||||
tables = []
|
tables = []
|
||||||
rsp = self._stub.RpcGetDbTables(wcf_pb2.String(str=db))
|
rsp = self._stub.RpcGetDbTables(wcf_pb2.String(str=db))
|
||||||
for tbl in rsp.tables:
|
for tbl in rsp.tables:
|
||||||
tables.append({"name": tbl.name, "sql": tbl.sql.replace("\t", "")})
|
tables.append({"name": tbl.name, "sql": tbl.sql})
|
||||||
return tables
|
return tables
|
||||||
|
|
||||||
def query_sql(self, db: str, sql: str) -> List[dict]:
|
def query_sql(self, db: str, sql: str) -> List[dict]:
|
Loading…
Reference in New Issue
Block a user