怎样才能彻底掌握flask?怎么个学习顺序比较合理
Flask Web Development这本书,循序渐进每一小节都有git tag,很方便看代码。不要太关注细节,如你提到的wsgi,先整体,后细节,而疑惑就需要自己进入源码找答案了。要深入学习还是需要看源码,了解flask的原理。比如context,request, session的原理;如何增加模板filter,如何注入方法;flask_sqlalchemy的db session也是构建在context上,具体原理;flask_cache的细节,memoize如何通过类方法清空实例方法的cache;jinja2的filter.py中的filter是否熟悉,bccache是否对你有用,深入了解模板原理。当遇到阻塞请求,如调用外部api时,如何提高系统吞吐量;用flask如何实现长连接(Comet)。。。(借助gevent,想明白后你就会发现其实tornado最有优势的优点其实不过如此)其实单纯的一个框架是有限的,难点在于如何和其它组件更好更高效的工作。
flask是什么
flask的意思是瓶子。一、基本释义1、可装入液体饮料的瓶子。2、小扁酒瓶,用金属或玻璃制成,常带皮套,随身携带。3、烧瓶或实验用长颈瓶:a bottle with a narrow top, used in scientific work for mixing or storing chemicals。3、Flask也是一个使用 Python编写的轻量级Web应用框架。二、单词读音美 [flæsk];英 [flɑːsk]。三、同义词n.bottle;flagon;carafe;hip flask;decante。flask的双语例句:1. The flask is completely watertight, even when laid on its side.即使平放,这个真空水杯也是滴水不漏。2. There's some sandwiches here and a flask of coffee.这里有些三明治和一瓶咖啡。3. She made sandwiches, filled a flask and put sugar in.她做了三明治,把保温瓶灌满,又放了糖进去。4. The vacuum flask has a strong casing, which won't crack or chip.这种热水瓶瓶身坚固,不易断裂破碎。5. He took a swig of whisky from his hip flask.他猛灌了一口扁酒瓶中的威士忌。6、The flask is completely watertight, even when laid on its side.即使平放,这个真空水杯也是滴水不漏。7、I'll go and get you another flask that's full at once. 我马上给您提一壶来。8、The table was littered with bottles, flasks, jars, cans, and what not. 瓶瓶罐罐摆了一桌子。