Title
Bottle: Python Web Framework — Bottle 0.13-dev documentation
Go Home
Category
Description
Bottle is a fast, simple and lightweight WSGI micro web-framework for Python.
Address
Phone Number
+1 609-831-2326 (US) | Message me
Site Icon
Bottle: Python Web Framework — Bottle 0.13-dev documentation
Page Views
0
Share
Update Time
2022-05-02 01:16:12

"I love Bottle: Python Web Framework — Bottle 0.13-dev documentation"

www.bottlepy.org VS www.gqak.com

2022-05-02 01:16:12

Bottle: Python Web Framework¶Bottle is a fast, simple and lightweight WSGI micro web-framework for Python. It is distributed as a single file module and has no dependencies other than the Python Standard Library.Routing: Requests to function-call mapping with support for clean and dynamic URLs.Templates: Fast and pythonic built-in template engine and support for mako, jinja2 and cheetah templates.Utilities: Convenient access to form data, file uploads, cookies, headers and other HTTP-related metadata.Server: Built-in HTTP development server and support for paste, bjoern, gae, cherrypy or any other WSGI capable HTTP server.Example: “Hello World” in a bottlefrom bottle import route, run, template@route('/hello/')def index(name): return template('Hello {{name}}!', name=name)run(host='localhost', port=8080)Run this script or paste it into a Python console, then point your browser to http://localhost:8080/hello/world. That’s it.Download and InstallInstall the latest stable release with pip install bottle or download bottle.py (unstable) into your project directory. There are no hard [1] dependencies other than the Python standard library. Bottle supports Python 2.7 and Python 3.Deprecated since version 0.13: Support for Python 2.5 and 2.6 was dropped with this release.User’s Guide¶Start here if you want to learn how to use the bottle framework for web development. If you have any questions not answered here, feel free to ask the mailing list.TutorialInstallationQuickstart: “Hello World”Request RoutingGenerating contentRequest DataTemplatesPluginsDevelopmentDeploymentGlossaryConfiguration (DRAFT)Configuration BasicsNaming ConventionLoading Configuration from a FileLoading Configuration from a python moduleLoading Configuration from a nested dictListening to configuration changesFilters and other Meta DataAPI DocumentationRequest RoutingRule SyntaxWildcard FiltersLegacy SyntaxExplicit routing configurationSimpleTemplate EngineSimpleTemplate SyntaxTemplate FunctionsSimpleTemplate APIDeploymentServer OptionsSwitching the Server BackendGood old CGIAPI ReferenceModule ContentsThe Bottle ClassThe Request ObjectThe Response ObjectTemplatesList of available PluginsKnowledge Base¶A collection of articles, guides and HOWTOs.Tutorial: Todo-List ApplicationGoalsBefore We Start…Using Bottle for a Web-Based ToDo ListServer SetupFinal WordsComplete Example ListingPrimer to Asynchronous ApplicationsThe Limits of Synchronous WSGIGreenlets to the rescueEvent CallbacksFinally: WebSocketsRecipesKeeping track of SessionsDebugging with Style: Debugging MiddlewareUnit-Testing Bottle ApplicationsFunctional Testing Bottle ApplicationsEmbedding other WSGI AppsIgnore trailing slashesKeep-alive requestsGzip Compression in BottleUsing the hooks pluginUsing Bottle with HerokuFrequently Asked QuestionsAbout BottleCommon Problems and PitfallsDevelopment and Contribution¶These chapters are intended for developers interested in the bottle development and release workflow.Release Notes and ChangelogRelease 0.13Release 0.12Release 0.11Release 0.10Release 0.9Release 0.8ContributorsDeveloper NotesGet involvedGet the SourcesReleases and UpdatesRepository StructureSubmitting PatchesBuilding the DocumentationGIT Workflow ExamplesPlugin Development GuideHow Plugins Work: The BasicsPlugin APIThe Route ContextRuntime optimizationsPlugin Example: SQLitePluginLicense¶Code and documentation are available according to the MIT License:Copyright (c) 2009-2022, Marcel Hellkamp.Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included inall copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS INTHE SOFTWARE.The Bottle logo however is NOT covered by that license. It is allowed touse the logo as a link to the bottle homepage or in direct context withthe unmodified library. In all other cases please ask first.Footnotes[1]Usage of the template or server adapter classes requires the corresponding template or server modules. Bottle is a fast, simple and lightweight WSGI micro web-framework for Python.InstallationInstall Bottle with pipinstallbottle or download the source package at PyPI.Releases Warning: This is a preview for Bottle-0.13-dev, which is not released yet. Switch to the latest stable release? Bottle dev (development) Bottle 0.12 (stable) Bottle 0.11 (old stable) Download Docs Download this documentation as PDF or HTML (zip) for offline use.Resources Twitter news Development blog GitHub repository Mailing list archive Freenode chatLike it? Hosted by: Quick search © Copyright 2009-2022, Marcel Hellkamp - Contact Last updated on Mar 15, 2022. Created using Sphinx 1.6.7. Powered by Bottle 0.13-dev