摘要:地址簡(jiǎn)介用極少的代碼實(shí)現(xiàn)一款框架,目標(biāo)是用低于行的代碼實(shí)現(xiàn)的核心功能,框架基于以上開(kāi)發(fā)特點(diǎn)安裝路由請(qǐng)求相應(yīng)中間件歡迎或者地址
簡(jiǎn)介github地址: https://github.com/gaojiuli/xweb
用極少的代碼實(shí)現(xiàn)一款web框架,目標(biāo)是用低于1000行的代碼實(shí)現(xiàn)flask的核心功能,xweb框架基于python3.5以上開(kāi)發(fā)
特點(diǎn)few code
do more
no dependencies
安裝pip install xweb
hello worldfrom xweb.application import XWeb app = XWeb() @app.route("/") def hello(): return "hello world!" app.listen(3000)路由
from xweb.application import XWeb app = XWeb() @app.route("/:name/") def call_my_name(name): return "hi {}!".format(name) app.listen(3000)請(qǐng)求
from xweb.globals import request request.path request.query_string request.query request.files request.forms request.json request.ip request.hostname request.headers相應(yīng)
from xweb.globals import response response.headers response.status response.body中間件
from xweb.application import XWeb app = XWeb() @app.middleware("request") def print_on_request1(): print("I print when a request is received by the server1") @app.middleware("request") def print_on_request2(): print("I print when a request is received by the server2") @app.middleware("response") def print_on_response1(): print("I print when a response is returned by the server1") @app.middleware("response") def print_on_response2(): print("I print when a response is returned by the server2") @app.route("/:name/") def call_my_name(name): return "hi {}!".format(name) app.listen(3000)TODO
more http status code
some necessary middleware
enough test code
support blueprint
a cool logo
歡迎star或者fork
github地址: xweb
文章版權(quán)歸作者所有,未經(jīng)允許請(qǐng)勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。
轉(zhuǎn)載請(qǐng)注明本文地址:http://www.ezyhdfw.cn/yun/81972.html
摘要:地址簡(jiǎn)介用極少的代碼實(shí)現(xiàn)一款框架,目標(biāo)是用低于行的代碼實(shí)現(xiàn)的核心功能,框架基于以上開(kāi)發(fā)特點(diǎn)安裝路由請(qǐng)求相應(yīng)中間件歡迎或者地址 github地址: https://github.com/gaojiuli/xweb 簡(jiǎn)介 用極少的代碼實(shí)現(xiàn)一款web框架,目標(biāo)是用低于1000行的代碼實(shí)現(xiàn)flask的核心功能,xweb框架基于python3.5以上開(kāi)發(fā) 特點(diǎn) few code do more...
摘要:簡(jiǎn)介項(xiàng)目地址眾所周知如今的后端開(kāi)發(fā)主要是負(fù)責(zé)接口的開(kāi)發(fā)而前后端分離又是當(dāng)下最流行的如果使用技術(shù)棧通常情況下我們會(huì)選擇全套或者他們的模板引擎功能在當(dāng)下的后端開(kāi)發(fā)中是基本不用的同時(shí)由于它們開(kāi)始的時(shí)候是基于寫(xiě)的造成了現(xiàn)在代碼中充斥著大量丑陋的兼容 簡(jiǎn)介 showImg(https://segmentfault.com/img/remote/1460000008633918?w=280&h=1...
摘要:為什么我會(huì)說(shuō)它們是一樣的簡(jiǎn)單思考一下我的后端書(shū)架后端掘金我的后端書(shū)架月前本書(shū)架主要針對(duì)后端開(kāi)發(fā)與架構(gòu)。一方案調(diào)研版本選擇當(dāng)前主流版本是和應(yīng)用的后臺(tái)運(yùn)行配置后端掘金醬油一篇,整理一下關(guān)于后臺(tái)運(yùn)行的一些配置方式。 分享 50 個(gè)完整的 React Native 項(xiàng)目 - 掘金本文為 Marno 原創(chuàng),轉(zhuǎn)載必須保留出處! 公眾號(hào) aMarno,關(guān)注后回復(fù) RN 加入交流群 簡(jiǎn)書(shū)專(zhuān)題《 Rea...
摘要:發(fā)布于之后,采用了完全不同的方式,使用函數(shù)定義任務(wù)。它允許開(kāi)發(fā)者使用它們的補(bǔ)丁和更新來(lái)修復(fù)這些安全漏洞。提供了工具用于掃描依賴(lài)來(lái)監(jiān)測(cè)漏洞。是一個(gè)開(kāi)源診斷工具,用于和應(yīng)用。是和開(kāi)發(fā)的一款新的包管理工具。與相比,它解決了安全性能以及一致性問(wèn)題。 譯者按: 最全的JavaScript開(kāi)發(fā)工具列表,總有一款適合你! 原文: THE ULTIMATE LIST OF JAVASCRIPT TOO...
閱讀 2222·2021-10-12 10:11
閱讀 914·2021-10-09 09:41
閱讀 3900·2021-09-09 11:37
閱讀 2034·2021-09-08 10:41
閱讀 2700·2019-08-30 12:58
閱讀 2429·2019-08-30 10:58
閱讀 1357·2019-08-26 13:40
閱讀 4256·2019-08-26 13:36