摘要: # 如果对象是ORM对象,则将其转换为字典并返回 if isinstance(obj.__class__, DeclarativeMeta): return {c.name: getattr(obj, c.name) for c in obj.__table__.columns} 阅读全文
posted @ 2024-03-19 14:33 bitterteaer 阅读(32) 评论(0) 推荐(0) 编辑
摘要: auth_user = 'admin' auth_passwd = '123456' usrPass = "%s:%s" % (auth_user, auth_passwd) b64Val = base64.b64encode(usrPass.encode('utf-8')) headers = { 阅读全文
posted @ 2024-03-19 11:32 bitterteaer 阅读(19) 评论(0) 推荐(0) 编辑