上一页 1 2 3 4 5 6 7 8 9 10 ··· 68 下一页
摘要: code import random import string import cherrypy class StringGenerator(object): @cherrypy.expose def index(self): return "Hello world!" @cherrypy.expo 阅读全文
posted @ 2020-12-23 15:47 anobscureretreat 阅读(100) 评论(0) 推荐(0) 编辑
摘要: code import cherrypy class HelloWorld(object): @cherrypy.expose def index(self): return "Hello world!" if __name__ == '__main__': cherrypy.quickstart( 阅读全文
posted @ 2020-12-23 15:46 anobscureretreat 阅读(84) 评论(0) 推荐(0) 编辑
摘要: app.conf [/favicon.ico] tools.staticfile.on: True tools.staticfile.filename: "/path/to/myfavicon.ico" test.py import cherrypy class HelloWorld(object) 阅读全文
posted @ 2020-12-23 15:43 anobscureretreat 阅读(157) 评论(0) 推荐(0) 编辑
摘要: app.conf [/] tools.gzip.on: True [googleapi] key = "..." appid = "..." test.py class Root(object): @cherrypy.expose def index(self): google_appid = ch 阅读全文
posted @ 2020-12-23 15:41 anobscureretreat 阅读(95) 评论(0) 推荐(0) 编辑
摘要: 第一种 app.conf [/] tools.gzip.on: True test.py cherrypy.quickstart(myapp, '/', "app.conf") 第二种 class Root(object): @cherrypy.expose @cherrypy.tools.gzip 阅读全文
posted @ 2020-12-23 15:39 anobscureretreat 阅读(218) 评论(0) 推荐(0) 编辑
摘要: code import cherrypy class Band(object): def __init__(self): self.albums = Album() def _cp_dispatch(self, vpath): if len(vpath) == 1: cherrypy.request 阅读全文
posted @ 2020-12-23 15:38 anobscureretreat 阅读(121) 评论(0) 推荐(0) 编辑
摘要: code from flask import Flask, send_from_directory import os cur_dir=os.path.dirname(__file__) app = Flask(__name__) @app.route("/download") def index( 阅读全文
posted @ 2020-12-23 15:28 anobscureretreat 阅读(622) 评论(0) 推荐(1) 编辑
摘要: github地址 https://github.com/.../..../.-/-../ /.--/.../ /-.-./-.-/.../.../..../.-/-../ /.--/.../ /-.-./-.-/.../tree/master 支持的加密方式 https://github.com/. 阅读全文
posted @ 2020-12-23 10:23 anobscureretreat 阅读(939) 评论(0) 推荐(0) 编辑
摘要: 安装 sudo apt-get install build-essential 下载 wget https://github.com/jedisct1/libsodium/releases/download/1.0.8/libsodium-1.0.8.tar.gz 解压 tar xf libsodi 阅读全文
posted @ 2020-12-23 09:59 anobscureretreat 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 下载地址: https://download.libsodium.org/libsodium/releases/ 支持以下加密方式 salsa20 and chacha20 下载: Wget https://download.libsodium.org/libsodium/releases/libs 阅读全文
posted @ 2020-12-23 09:55 anobscureretreat 阅读(755) 评论(0) 推荐(0) 编辑
摘要: code import paho.mqtt.client as mqtt import time import sys HOST = “1.1.1.1" PORT = 1883 def on_connect(client, userdata, flags, rc): print("Connected 阅读全文
posted @ 2020-12-23 00:42 anobscureretreat 阅读(384) 评论(0) 推荐(0) 编辑
摘要: 不转义 var lyric ={{lyrics| safe}}; 阅读全文
posted @ 2020-12-23 00:35 anobscureretreat 阅读(181) 评论(0) 推荐(0) 编辑
摘要: text/html(默认的,html文件) text/plain(纯文本) text/css(css文件) text/javascript(js文件) application/x-www-form-urlencoded(普通的表单提交) multipart/form-data(文件提交) appli 阅读全文
posted @ 2020-12-23 00:33 anobscureretreat 阅读(622) 评论(0) 推荐(0) 编辑
摘要: code #coding=utf-8 from flask import Flask,Response,jsonify,render_template,send_from_directory,make_response from flask_restful import Api, Resource, 阅读全文
posted @ 2020-12-23 00:32 anobscureretreat 阅读(114) 评论(0) 推荐(0) 编辑
摘要: xxx.py:9: DeprecationWarning: The import 'werkzeug.FileStorage' is deprecated and will be removed in Werkzeug 1.0. Use 'from werkzeug.datastructures i 阅读全文
posted @ 2020-12-23 00:31 anobscureretreat 阅读(80) 评论(0) 推荐(0) 编辑
摘要: code import werkzeug from flask import Flask import tarfile from flask_restful import Resource, Api, reqparse from werkzeug.datastructures import File 阅读全文
posted @ 2020-12-23 00:30 anobscureretreat 阅读(483) 评论(0) 推荐(0) 编辑
摘要: code from flask import Flask from flask import jsonify import random app = Flask(__name__) @app.route('/') def hello_world(): return 'Hello World!' @a 阅读全文
posted @ 2020-12-23 00:29 anobscureretreat 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 如果是application/json方式 from flask_restful import request dict = request.json() 如果是application/x-www-form-urlencoded方式 from flask_restful import request 阅读全文
posted @ 2020-12-23 00:28 anobscureretreat 阅读(849) 评论(0) 推荐(0) 编辑
摘要: code @app.route('/‘) def hello_world(): return render_template('index.html’) 阅读全文
posted @ 2020-12-23 00:26 anobscureretreat 阅读(147) 评论(0) 推荐(0) 编辑
摘要: code from flask import Flask,Response from flask_restful import Api, Resource, reqparse import werkzeug app = Flask(__name__) api = Api(app) class Upl 阅读全文
posted @ 2020-12-23 00:25 anobscureretreat 阅读(1378) 评论(0) 推荐(0) 编辑
摘要: code from flask import Flask from flask_restful import Api, Resource, reqparse import werkzeug app = Flask(__name__) api = Api(app) class Uploads(Reso 阅读全文
posted @ 2020-12-23 00:21 anobscureretreat 阅读(430) 评论(0) 推荐(0) 编辑
摘要: code from flask import Flask from flask_restful import Api,Resource app = Flask(__name__) api = Api(app) class HelloWorld(Resource): def get(self): re 阅读全文
posted @ 2020-12-23 00:20 anobscureretreat 阅读(91) 评论(0) 推荐(0) 编辑
摘要: code from flask import Flask from flask_restful import reqparse, abort, Api, Resource app = Flask(__name__) api = Api(app) TODOS = { 'todo1': {'task': 阅读全文
posted @ 2020-12-23 00:17 anobscureretreat 阅读(292) 评论(0) 推荐(0) 编辑
摘要: code Xampp(mysql) Pycharm(vscode) Navicat 阅读全文
posted @ 2020-12-23 00:14 anobscureretreat 阅读(111) 评论(0) 推荐(0) 编辑
摘要: code pip3.7 install flask-wtf 阅读全文
posted @ 2020-12-23 00:12 anobscureretreat 阅读(79) 评论(0) 推荐(0) 编辑
摘要: 保证Url唯一性 Demo1 from flask import Flask app = Flask(__name__) @app.route("/hello") def hello(): return "hello world" app.run() 浏览器访问/hello 浏览器访问/hello/ 阅读全文
posted @ 2020-12-23 00:07 anobscureretreat 阅读(46) 评论(0) 推荐(0) 编辑
摘要: 新建一个config.py文件,参数必须全部大写 DEBUG=True fisher.py from flask import Flask app = Flask(__name__) app.config.from_object("config") @app.route("/hello") def 阅读全文
posted @ 2020-12-23 00:03 anobscureretreat 阅读(84) 评论(0) 推荐(0) 编辑
摘要: 打开自动重启 app.run(debug=True) 1.装饰器方式 from flask import Flask app = Flask(__name__) @app.route("/hello") def hello(): return "hello world" app.run(debug= 阅读全文
posted @ 2020-12-22 23:56 anobscureretreat 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 第一种 新建一个config.py文件 Debug=True fisher.py from flask import Flask from config import Debug app = Flask(__name__) @app.route("/hello") def hello(): retu 阅读全文
posted @ 2020-12-22 23:55 anobscureretreat 阅读(636) 评论(0) 推荐(0) 编辑
摘要: 图片素材网站———————————————— Pixoboy https://pixabay.com/zh/ pexels https://www.pexels.com/zh-cn/ Vector creator https://icons8.com/vector-creator/ Cleanpng 阅读全文
posted @ 2020-12-22 23:52 anobscureretreat 阅读(471) 评论(0) 推荐(0) 编辑
摘要: 安装插件 Parameterized Trigger plugin 新建job,勾选参数化 新建以下6种参数化选项 1. 2. 3.(注意这里的文件路径是相对项目根目录来说的,比如当前的项目的路径为"~/.jenkins/workspace/automate1/",那么下面的配置表示, 上传一个图片 阅读全文
posted @ 2020-12-22 23:34 anobscureretreat 阅读(102) 评论(0) 推荐(0) 编辑
摘要: 前言 .env文件是httprunner项目创建时,自带的一个文件,这个文件的主要功能就是将一些大量引用的数据进行参数化处理,比如host,比如登录账号,比如常用的身份id 正文 .env文件的编写 如下图所示,.env文件的编写其实非常简单,只是简单的键名=键值;但是需要注意的是,不要有空行!!! 阅读全文
posted @ 2020-12-22 18:52 anobscureretreat 阅读(341) 评论(0) 推荐(0) 编辑
摘要: TLS 1.2 简介TLS概述:TLS和他的前身SSL,都是提供在计算机网络上安全通信的密码学协议,最常见就是用于HTTPS中,用来保护Web通信的。发展史:网景公司开发了原始的SSL协议,SSL 1.0因为本身存在着严重的安全问题,所以从未被公开发布。只有SSL 2.0和SSL 3.0是被公开发布 阅读全文
posted @ 2020-12-22 11:09 anobscureretreat 阅读(8193) 评论(0) 推荐(2) 编辑
摘要: https://api.getfiddler.com/mac/latest-mac 阅读全文
posted @ 2020-12-21 10:39 anobscureretreat 阅读(110) 评论(0) 推荐(0) 编辑
摘要: code #操作sqlite #id,book_name,book_user_name,book_url,book_passwd,book_pic,book_category,book_synopsis,book_type,book_format,book_size,book_author_syno 阅读全文
posted @ 2020-12-21 10:15 anobscureretreat 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 在接口的上一级,点击鼠标右键,选择断点 刷新app页面,使接口发出请求,此时Charles 跳转到修改请求页面,修改请求完成后,点击执行 页面跳转到修改响应页面,修改完成后,点击执行 以上步骤,即可实现修改接口返回值。 阅读全文
posted @ 2020-12-21 10:07 anobscureretreat 阅读(117) 评论(0) 推荐(0) 编辑
摘要: settings.py #LANGUAGE_CODE = 'en-us' LANGUAGE_CODE = 'zh-hans' #TIME_ZONE = 'UTC' TIME_ZONE = 'Asia/Shanghai' USE_I18N = True USE_L10N = True USE_TZ = 阅读全文
posted @ 2020-12-18 19:30 anobscureretreat 阅读(198) 评论(0) 推荐(0) 编辑
摘要: code import unittest from HTMLTestRunner import HTMLTestRunner class Test3(unittest.TestCase): @classmethod def setUpClass(self): print("execute setUp 阅读全文
posted @ 2020-12-18 18:45 anobscureretreat 阅读(141) 评论(0) 推荐(0) 编辑
摘要: test.py import unittest class Test1(unittest.TestCase): @classmethod def setUpClass(self): print("execute setUpClass1") @classmethod def tearDownClass 阅读全文
posted @ 2020-12-18 18:41 anobscureretreat 阅读(100) 评论(0) 推荐(0) 编辑
摘要: github: https://github.com/pyppeteer/pyppeteer 如果大家对 Python 爬虫有所了解的话,想必你应该听说过 Selenium 这个库,这实际上是一个自动化测试工具,现在已经被广泛用于网络爬虫中来应对 JavaScript 渲染的页面的抓取。 但 Sel 阅读全文
posted @ 2020-12-18 15:02 anobscureretreat 阅读(177) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 68 下一页