摘要: flask_script用法: #_*_ encoding: utf-8 _*_ @author: ty hery 2019/1/12 from flask_script import Manager from flask import Flask import sqlite3 app = Flas 阅读全文
posted @ 2021-04-12 22:29 ty1539 阅读(110) 评论(0) 推荐(0) 编辑
摘要: #_*_ encoding: utf-8 _*_ @author: ty hery 2019/12/20 from flask import Flask, session, current_app, g # g 是临时的本App里面的变量对象,通过对象的方法保存数据 如 g.username='张三 阅读全文
posted @ 2021-04-12 22:20 ty1539 阅读(71) 评论(0) 推荐(0) 编辑
摘要: #_*_ encoding: utf-8 _*_ @author: ty hery 2019/12/20 from flask import Flask, session, current_app, g # g 是临时的本App里面的变量对象,通过对象的方法保存数据 如 g.username='张三 阅读全文
posted @ 2021-04-12 22:19 ty1539 阅读(294) 评论(0) 推荐(0) 编辑
摘要: #_*_ encoding: utf-8 _*_ @author: ty hery 2019/12/20 from flask import Flask, request, abort, Response, make_response, jsonify # from werkzeug.routing 阅读全文
posted @ 2021-04-12 22:17 ty1539 阅读(51) 评论(0) 推荐(0) 编辑
摘要: #_*_ encoding: utf-8 _*_ @author: ty hery 2019/12/20 from flask import Flask, request, abort, Response, make_response, jsonify # from werkzeug.routing 阅读全文
posted @ 2021-04-12 22:16 ty1539 阅读(133) 评论(0) 推荐(0) 编辑
摘要: from flask import Flask from flask_restful import Api,Resource app = Flask(__name__) api = Api(app) class HelloWorld(Resource): def get(self): return 阅读全文
posted @ 2021-04-12 22:13 ty1539 阅读(38) 评论(0) 推荐(0) 编辑
摘要: 1.add_url_rule函数 之前我们接触的视图都是函数,所以一般简称视图函数。其实视图也可以基于类来实现,类视图的好处是支持继承,但是类视图不能跟函数视图一样,写完类视图还需要通过app.add_url_rule()函数来进行注册。 app.add_url_rule(rule, endpoin 阅读全文
posted @ 2021-04-12 21:24 ty1539 阅读(436) 评论(0) 推荐(0) 编辑
摘要: Python垃圾回收机制 引用计数器为主, 标记清除和分代回收为辅, + 缓存机制 1.引用计数器 1.1 环状双向链表refchain 在python 程序中创建的任何对象都会放在refchain链表中. 在Python的C源码中有一个名为refchain的环状双向链表,这个链表比较牛逼了,因为P 阅读全文
posted @ 2021-04-12 14:32 ty1539 阅读(63) 评论(0) 推荐(0) 编辑
摘要: 可以参考: https://www.cnblogs.com/linwenbin/p/10617242.html 在本地python虚拟环境安装 pip install fabric==1.14.0 # pip install ecdsa pip install PyCrypto 好似要做python 阅读全文
posted @ 2021-04-12 14:27 ty1539 阅读(66) 评论(0) 推荐(0) 编辑
摘要: Supervisor(http://supervisord.org/)是用Python开发的一个client/server服务,是Linux/Unix系统下的一个进程管理工具,不支持Windows系统。它可以很方便的监听、启动、停止、重启一个或多个进程。用Supervisor管理的进程,当一个进程意 阅读全文
posted @ 2021-04-11 23:29 ty1539 阅读(175) 评论(0) 推荐(0) 编辑