Best Python code snippet using autotest_python
flask_client.py
Source:flask_client.py
2app = Flask(__name__)3@app.route('/index')4def index():5 # é¦é¡µ6 return send_file('templates/index.html')7@app.route('/video')8def video():9 # çµå½±10 return send_file('templates/video.html')11@app.route('/movies/classification/')12def classification():13 # çµå½±åç±»14 return send_file('templates/classification.html')15@app.route('/<username>/home/history')16def history(username):17 # åå²è®°å½18 return send_file('templates/html/history.html')19@app.route('/top100/')20def top100():21 return send_file('templates/top100.html')22@app.route('/top100/<cursor>')23def pager_top100(cursor):24 return send_file('templates/top100.html')25@app.route('/login')26def login():27 # ç»å½28 return send_file('templates/login.html')29@app.route('/register')30def register():31 # 注å32 return send_file('templates/register.html')33@app.route('/<username>/home/profile')34def profile(username):35 # 个人ä¸å¿36 return send_file('templates/html/profile.html')37@app.route('/<username>/home/video')38def my_video(username):39 # 个人ä¸å¿40 return send_file('templates/html/myvideo.html')41@app.route('/<username>/home/fans')42def fans(username):43 # 个人ä¸å¿44 return send_file('templates/html/fans.html')45@app.route('/<username>/home/attention')46def attention(username):47 # 个人ä¸å¿48 return send_file('templates/html/attention.html')49@app.route('/<username>/movies/release')50def video_release(username):51 # ä¸ä¼ è§é¢52 return send_file('templates/release.html')53@app.route('/<username>/space')54def space(username):55 # 个人空é´56 return send_file('templates/space.html')57@app.route('/<username>/attention')58def attention_user(username):59 # å
³æ³¨çç¨æ·60 return send_file('templates/attention_user.html')61@app.route('/<username>/fans')62def fans_user(username):63 # å
³æ³¨taçç¨æ·64 return send_file('templates/fans_user.html')65@app.route('/movie/<int:m_id>')66def movies_detail(m_id):67 # çµå½±è¯¦æ
页68 return send_file('templates/detail.html')69@app.route('/movie/player/<int:m_id>')70def player(m_id):71 # çµå½±ææ¾é¡µ72 return send_file('templates/player.html')73@app.route('/movie/shortplayer/<int:m_id>')74def shortplayer(m_id):75 # çµå½±ææ¾é¡µ76 return send_file('templates/shortplayer.html')77@app.route('/404')78def error():79 # error80 return send_file('templates/html/pages-error-404.html')81if __name__ == '__main__':...
app.py
Source:app.py
...9def redirindex():10 return redirect("http://93.12.72.173/cv",code=302)11@app.route('/cv/assets/img/elie_ntumba.jpg')12def elie_ntumba_jpg():13 return send_file("assets/img/elie_ntumba.jpg", mimetype="image/jpg")14@app.route('/cv/Facebook.png')15def fb_png():16 return send_file("assets/img/Facebook.png", mimetype='image/png')17@app.route('/cv/assets/css/animated.min.css')18def animated_css():19 return send_file("assets/css/animated.min.css", mimetype='text/css')20@app.route('/cv/assets/css/materialize.min.css')21def materialize_css():22 return send_file("assets/css/materialize.min.css", mimetype='text/css')23@app.route('/background1.jpg')24def back1_jpg():25 return send_file("assets/img/background1.jpg", mimetype='text/jpg')26@app.route('/background2.jpg')27def back2_jpg():28 return send_file("assets/img/background2.jpg", mimetype='text/jpg')29@app.route('/background3.jpg')30def back3_jpg():31 return send_file("assets/img/background3.jpg", mimetype='text/jpg')32@app.route('/js/materialize.js')33def materialize_js():34 return send_file("assets/js/materialize.min.js", mimetype='text/js')35@app.route('/js/init.js')36def materialize_init():37 return send_file("assets/js/init.js", mimetype='text/js')38@app.route('/cv/logo_PC.png')39def logo_png():40 return send_file("logo_PC.png", mimetype='image/png')41@app.route('/cv/assets/css/style.css')42def style_css():43 return send_file("assets/css/style.css", mimetype='text/css')44@app.route('/cv/assets/img/instagram.png')45def instagram_png():46 return send_file("assets/img/instagram.png", mimetype='image/png')47@app.route('/cv/assets/img/Elie_Intro1.jpg')48def elie_png():49 return send_file("assets/img/Elie_Intro1.jpg", mimetype='image/jpg')50@app.route('/cv/assets/img/linkedin.png')51def linkedin_png():52 return send_file("assets/img/linkedin.png", mimetype='image/png')53@app.route('/cv/logo_PC.ico')54def logo_pc_ico():55 return send_file("logo_PC.ico", mimetype='image/x-icon')56if __name__ == '__main__' :...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!