SlideShare ist ein Scribd-Unternehmen logo
1 von 47
Downloaden Sie, um offline zu lesen
... 先不談 Django
Joe @ Tainan.py 2013.6.14
你聽過 Bottle 嗎?
今天真的不會提到
Django!
Let's talk about Bottle today:
Part 1: About me
Part 2: Bottle basic
Part 3: Bottle + gevent
Part 4: My sad story
Part 5: Conclusion
Part 1: About me
Joe
應該算是文字工作者
平常用 Vim ...
純
PyConTw 2013 Volunteer
Python newer (1.5 year)
Work at startup:
My blog
Part 2: Bottle basic
Author
Author
Following RFC ... 德國人無誤 Good Job!!
Progress
• 2009 ~ 2013
• Always single file
• Always no dependencies other than STD
• Always lack of ORM, session management
support ...
• Source code: around 1000+ ~ 3000+
Applications

• Blog, chat room, any small web app ...
• Good at providing API service
• Good performance
• Good for experimental service
Who use it ?
Rank
Documentations
Before Tutorial
Tutorial
• sudo pip install bottle
• Features
• WSGI, Single files, Use STD only ....
• Routing
• Templates
• Build-in Server
• Utilities for http-related access
Tutorial - hello world
Go to Official Website !
Tutorial - routing
Tutorial - static files
Tutorial - redirect
Tutorial - error pages
Tutorial - IO
Tutorial - cookies ...
Tutorial - file upload
Tutorial - WSGI
Tutorial - templates
Tutorial - plugins
Tutorial - others ...
Tutorial - more...
Go to Official Website or Blog !!
Part 3: Bottle + gevent
Gevent
Go to stieglitz.github.com/gevent-tutorial/
Run gevent server
Part 4: My sad story
Bottle and me
• One year ... experience
• API server
• FakeAPI server
• Piposea
• Pipostv (web + iOS)
• Memory millionaire (web + iOS)
怎麼使用 Bottle 開發的服務都死光光了 XD !
Bottle and me
• Reasons:
思維不夠 Bottle ...
創業問題 ... 之後再來聊聊 ...
Bottle and me
• Now:
Simple API server ... Good
Simple web app ... Good
Complex app ... Not good, but possible
How ?
Larger Bottle
Larger Bottle
Larger Bottle
Use python decorator, too ...
Larger Bottle
Larger Bottle
Larger Bottle
Larger Bottle
Larger Bottle
Larger Bottle
Part 5: Conclusion
工商服務
• PyconTW 2013 (有教學課程)
敝公司徵才中...
誰來教我寫前端啊 ... Orz

Weitere ähnliche Inhalte

Mehr von Chun-Yu Tseng

from ai.backend import python @ pycontw2018
from ai.backend import python @ pycontw2018from ai.backend import python @ pycontw2018
from ai.backend import python @ pycontw2018Chun-Yu Tseng
 
從蟒蛇到神龍 - 從 1 接關繼續打造爬蟲程式
從蟒蛇到神龍 - 從 1 接關繼續打造爬蟲程式從蟒蛇到神龍 - 從 1 接關繼續打造爬蟲程式
從蟒蛇到神龍 - 從 1 接關繼續打造爬蟲程式Chun-Yu Tseng
 
Agile x API x Documentation @ NGO [[MOPCON2015]]
Agile x API x Documentation @ NGO [[MOPCON2015]]Agile x API x Documentation @ NGO [[MOPCON2015]]
Agile x API x Documentation @ NGO [[MOPCON2015]]Chun-Yu Tseng
 
快快樂樂成為 Coding Ninja (by pytest) @ PyConAPAC2015
快快樂樂成為 Coding Ninja (by pytest) @ PyConAPAC2015快快樂樂成為 Coding Ninja (by pytest) @ PyConAPAC2015
快快樂樂成為 Coding Ninja (by pytest) @ PyConAPAC2015Chun-Yu Tseng
 
程式 x 設計 @ MOPCON 2014
程式 x 設計 @ MOPCON 2014程式 x 設計 @ MOPCON 2014
程式 x 設計 @ MOPCON 2014Chun-Yu Tseng
 
介紹 MOSUT @ 2014.09.26 自由軟體開發與社群發展
介紹 MOSUT @ 2014.09.26 自由軟體開發與社群發展介紹 MOSUT @ 2014.09.26 自由軟體開發與社群發展
介紹 MOSUT @ 2014.09.26 自由軟體開發與社群發展Chun-Yu Tseng
 
OO x Python @ Tainan.py x MOSUT x FP 2014.09.27
OO x Python  @ Tainan.py x MOSUT x FP 2014.09.27OO x Python  @ Tainan.py x MOSUT x FP 2014.09.27
OO x Python @ Tainan.py x MOSUT x FP 2014.09.27Chun-Yu Tseng
 
用路人小幫手 x 回報大改造 @ 2014 台南黑客松
用路人小幫手 x 回報大改造 @ 2014 台南黑客松用路人小幫手 x 回報大改造 @ 2014 台南黑客松
用路人小幫手 x 回報大改造 @ 2014 台南黑客松Chun-Yu Tseng
 
Testing in Python @ Kaosiung.py 2014.05.26
Testing in Python @ Kaosiung.py 2014.05.26Testing in Python @ Kaosiung.py 2014.05.26
Testing in Python @ Kaosiung.py 2014.05.26Chun-Yu Tseng
 
PyConAPAC2014 BoF Introduction
PyConAPAC2014 BoF IntroductionPyConAPAC2014 BoF Introduction
PyConAPAC2014 BoF IntroductionChun-Yu Tseng
 
PyConAPAC2014 Tainan.py 介紹
PyConAPAC2014 Tainan.py 介紹PyConAPAC2014 Tainan.py 介紹
PyConAPAC2014 Tainan.py 介紹Chun-Yu Tseng
 
暖場 @ Tainan.py 2013.11.30
暖場 @ Tainan.py 2013.11.30 暖場 @ Tainan.py 2013.11.30
暖場 @ Tainan.py 2013.11.30 Chun-Yu Tseng
 
API 文件大亂鬥 @ MOPCON 2013
API 文件大亂鬥 @ MOPCON 2013API 文件大亂鬥 @ MOPCON 2013
API 文件大亂鬥 @ MOPCON 2013Chun-Yu Tseng
 
暖場與 Web 相關的小玩具 @ Tainan.py 2013.09.28
暖場與 Web 相關的小玩具 @ Tainan.py 2013.09.28暖場與 Web 相關的小玩具 @ Tainan.py 2013.09.28
暖場與 Web 相關的小玩具 @ Tainan.py 2013.09.28Chun-Yu Tseng
 

Mehr von Chun-Yu Tseng (16)

from ai.backend import python @ pycontw2018
from ai.backend import python @ pycontw2018from ai.backend import python @ pycontw2018
from ai.backend import python @ pycontw2018
 
導讀 Clean Code
導讀 Clean Code導讀 Clean Code
導讀 Clean Code
 
從蟒蛇到神龍 - 從 1 接關繼續打造爬蟲程式
從蟒蛇到神龍 - 從 1 接關繼續打造爬蟲程式從蟒蛇到神龍 - 從 1 接關繼續打造爬蟲程式
從蟒蛇到神龍 - 從 1 接關繼續打造爬蟲程式
 
Agile x API x Documentation @ NGO [[MOPCON2015]]
Agile x API x Documentation @ NGO [[MOPCON2015]]Agile x API x Documentation @ NGO [[MOPCON2015]]
Agile x API x Documentation @ NGO [[MOPCON2015]]
 
快快樂樂成為 Coding Ninja (by pytest) @ PyConAPAC2015
快快樂樂成為 Coding Ninja (by pytest) @ PyConAPAC2015快快樂樂成為 Coding Ninja (by pytest) @ PyConAPAC2015
快快樂樂成為 Coding Ninja (by pytest) @ PyConAPAC2015
 
程式 x 設計 @ MOPCON 2014
程式 x 設計 @ MOPCON 2014程式 x 設計 @ MOPCON 2014
程式 x 設計 @ MOPCON 2014
 
介紹 MOSUT @ 2014.09.26 自由軟體開發與社群發展
介紹 MOSUT @ 2014.09.26 自由軟體開發與社群發展介紹 MOSUT @ 2014.09.26 自由軟體開發與社群發展
介紹 MOSUT @ 2014.09.26 自由軟體開發與社群發展
 
OO x Python @ Tainan.py x MOSUT x FP 2014.09.27
OO x Python  @ Tainan.py x MOSUT x FP 2014.09.27OO x Python  @ Tainan.py x MOSUT x FP 2014.09.27
OO x Python @ Tainan.py x MOSUT x FP 2014.09.27
 
用路人小幫手 x 回報大改造 @ 2014 台南黑客松
用路人小幫手 x 回報大改造 @ 2014 台南黑客松用路人小幫手 x 回報大改造 @ 2014 台南黑客松
用路人小幫手 x 回報大改造 @ 2014 台南黑客松
 
Testing in Python @ Kaosiung.py 2014.05.26
Testing in Python @ Kaosiung.py 2014.05.26Testing in Python @ Kaosiung.py 2014.05.26
Testing in Python @ Kaosiung.py 2014.05.26
 
Tip for Editors
Tip for EditorsTip for Editors
Tip for Editors
 
PyConAPAC2014 BoF Introduction
PyConAPAC2014 BoF IntroductionPyConAPAC2014 BoF Introduction
PyConAPAC2014 BoF Introduction
 
PyConAPAC2014 Tainan.py 介紹
PyConAPAC2014 Tainan.py 介紹PyConAPAC2014 Tainan.py 介紹
PyConAPAC2014 Tainan.py 介紹
 
暖場 @ Tainan.py 2013.11.30
暖場 @ Tainan.py 2013.11.30 暖場 @ Tainan.py 2013.11.30
暖場 @ Tainan.py 2013.11.30
 
API 文件大亂鬥 @ MOPCON 2013
API 文件大亂鬥 @ MOPCON 2013API 文件大亂鬥 @ MOPCON 2013
API 文件大亂鬥 @ MOPCON 2013
 
暖場與 Web 相關的小玩具 @ Tainan.py 2013.09.28
暖場與 Web 相關的小玩具 @ Tainan.py 2013.09.28暖場與 Web 相關的小玩具 @ Tainan.py 2013.09.28
暖場與 Web 相關的小玩具 @ Tainan.py 2013.09.28
 

Kürzlich hochgeladen

Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 

Kürzlich hochgeladen (20)

Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 

Bottle Intro @ Tainan.py 2013.6.14