25 lines
617 B
Python
25 lines
617 B
Python
from appPublic.jsonConfig import getConfig
|
|
import openpyxl as xlsx
|
|
import asyncio
|
|
from sqlor.dbpools import DBPools
|
|
import aiomysql
|
|
import aiopg
|
|
from typeconv import convrec
|
|
|
|
async def test():
|
|
db = DBPools()
|
|
async with db.sqlorContext('kboss') as sor:
|
|
recs = await sor.R('appcodes', {})
|
|
a = recs[0]['create_at']
|
|
print('a=', a, type(a), dir(a), '%020d' % int(a.timestamp()*1000))
|
|
|
|
if __name__ == '__main__':
|
|
import sys
|
|
import os
|
|
p = os.getcwd()
|
|
config = getConfig(p)
|
|
print(f'{config.databases=},cwd={p}')
|
|
db = DBPools(config.databases)
|
|
loop = asyncio.get_event_loop()
|
|
loop.run_until_complete(test())
|