Welcome to Flask — Flask Documentation (2.0.x)
文章推薦指數: 80 %
The rest of the docs describe each component of Flask in detail, with a full reference in the API section. Flask depends on the Jinja template engine and the ... Navigation index modules| next| FlaskDocumentation(2.0.x)» WelcometoFlask WelcometoFlask¶ WelcometoFlask’sdocumentation.GetstartedwithInstallation andthengetanoverviewwiththeQuickstart.Thereisalsoa moredetailedTutorialthatshowshowtocreateasmallbut completeapplicationwithFlask.Commonpatternsaredescribedinthe PatternsforFlasksection.Therestofthedocsdescribeeach componentofFlaskindetail,withafullreferenceintheAPI section. FlaskdependsontheJinjatemplateengineandtheWerkzeugWSGI toolkit.Thedocumentationfortheselibrariescanbefoundat: Jinjadocumentation Werkzeugdocumentation User’sGuide¶ Thispartofthedocumentation,whichismostlyprose,beginswithsome backgroundinformationaboutFlask,thenfocusesonstep-by-step instructionsforwebdevelopmentwithFlask. Foreword Whatdoes“micro”mean? ConfigurationandConventions GrowingwithFlask ForewordforExperiencedProgrammers Thread-LocalsinFlask DevelopfortheWebwithCaution Installation PythonVersion Dependencies Virtualenvironments InstallFlask Quickstart AMinimalApplication WhattodoiftheServerdoesnotStart DebugMode HTMLEscaping Routing StaticFiles RenderingTemplates AccessingRequestData RedirectsandErrors AboutResponses Sessions MessageFlashing Logging HookinginWSGIMiddleware UsingFlaskExtensions DeployingtoaWebServer Tutorial ProjectLayout ApplicationSetup DefineandAccesstheDatabase BlueprintsandViews Templates StaticFiles BlogBlueprint MaketheProjectInstallable TestCoverage DeploytoProduction KeepDeveloping! Templates JinjaSetup StandardContext ControllingAutoescaping RegisteringFilters ContextProcessors TestingFlaskApplications IdentifyingTests Fixtures SendingRequestswiththeTestClient FollowingRedirects AccessingandModifyingtheSession RunningCommandswiththeCLIRunner TeststhatdependonanActiveContext HandlingApplicationErrors ErrorLoggingTools ErrorHandlers CustomErrorPages BlueprintErrorHandlers ReturningAPIErrorsasJSON Logging Debugging DebuggingApplicationErrors InProduction TheBuilt-InDebugger ExternalDebuggers Logging BasicConfiguration EmailErrorstoAdmins InjectingRequestInformation OtherLibraries ConfigurationHandling ConfigurationBasics EnvironmentandDebugFeatures BuiltinConfigurationValues ConfiguringfromPythonFiles ConfiguringfromDataFiles ConfiguringfromEnvironmentVariables ConfigurationBestPractices Development/Production InstanceFolders Signals SubscribingtoSignals CreatingSignals SendingSignals SignalsandFlask’sRequestContext DecoratorBasedSignalSubscriptions CoreSignals PluggableViews BasicPrinciple MethodHints MethodBasedDispatching DecoratingViews MethodViewsforAPIs TheApplicationContext PurposeoftheContext LifetimeoftheContext ManuallyPushaContext StoringData EventsandSignals TheRequestContext PurposeoftheContext LifetimeoftheContext ManuallyPushaContext HowtheContextWorks CallbacksandErrors ContextPreservationonError NotesOnProxies ModularApplicationswithBlueprints WhyBlueprints? TheConceptofBlueprints MyFirstBlueprint RegisteringBlueprints NestingBlueprints BlueprintResources BuildingURLs BlueprintErrorHandlers Extensions FindingExtensions UsingExtensions BuildingExtensions CommandLineInterface ApplicationDiscovery RuntheDevelopmentServer OpenaShell Environments DebugMode EnvironmentVariablesFromdotenv EnvironmentVariablesFromvirtualenv CustomCommands Plugins CustomScripts PyCharmIntegration DevelopmentServer CommandLine InCode WorkingwiththeShell CommandLineInterface CreatingaRequestContext FiringBefore/AfterRequest FurtherImprovingtheShellExperience PatternsforFlask LargeApplicationsasPackages ApplicationFactories ApplicationDispatching UsingURLProcessors DeployingwithSetuptools DeployingwithFabric UsingSQLite3withFlask SQLAlchemyinFlask UploadingFiles Caching ViewDecorators FormValidationwithWTForms TemplateInheritance MessageFlashing AJAXwithjQuery LazilyLoadingViews MongoDBwithMongoEngine Addingafavicon StreamingContents DeferredRequestCallbacks AddingHTTPMethodOverrides RequestContentChecksums CeleryBackgroundTasks SubclassingFlask Single-PageApplications DeploymentOptions Hostedoptions Self-hostedoptions BecomingBig ReadtheSource. Hook.Extend. Subclass. Wrapwithmiddleware. Fork. Scalelikeapro. Discusswiththecommunity. Usingasyncandawait Performance Backgroundtasks WhentouseQuartinstead Extensions Othereventloops APIReference¶ Ifyouarelookingforinformationonaspecificfunction,classor method,thispartofthedocumentationisforyou. API ApplicationObject BlueprintObjects IncomingRequestData ResponseObjects Sessions SessionInterface TestClient TestCLIRunner ApplicationGlobals UsefulFunctionsandClasses MessageFlashing JSONSupport TemplateRendering Configuration StreamHelpers UsefulInternals Signals Class-BasedViews URLRouteRegistrations ViewFunctionOptions CommandLineInterface AdditionalNotes¶ Designnotes,legalinformationandchangelogareherefortheinterested. DesignDecisionsinFlask TheExplicitApplicationObject TheRoutingSystem OneTemplateEngine MicrowithDependencies ThreadLocals Async/awaitandASGIsupport WhatFlaskis,WhatFlaskisNot HTML/XHTMLFAQ HistoryofXHTML HistoryofHTML5 HTMLversusXHTML Whatdoes“strict”mean? NewtechnologiesinHTML5 Whatshouldbeused? SecurityConsiderations Cross-SiteScripting(XSS) Cross-SiteRequestForgery(CSRF) JSONSecurity SecurityHeaders Copy/PastetoTerminal FlaskExtensionDevelopment AnatomyofanExtension “HelloFlaskext!” InitializingExtensions TheExtensionCode Using_app_ctx_stack LearnfromOthers ApprovedExtensions HowtocontributetoFlask Supportquestions Reportingissues Submittingpatches License BSD-3-ClauseSourceLicense ArtworkLicense Changes Version2.0.3 Version2.0.2 Version2.0.1 Version2.0.0 Version1.1.4 Version1.1.3 Version1.1.2 Version1.1.1 Version1.1.0 Version1.0.4 Version1.0.3 Version1.0.2 Version1.0.1 Version1.0 Version0.12.5 Version0.12.4 Version0.12.3 Version0.12.2 Version0.12.1 Version0.12 Version0.11.1 Version0.11 Version0.10.1 Version0.10 Version0.9 Version0.8.1 Version0.8 Version0.7.2 Version0.7.1 Version0.7 Version0.6.1 Version0.6 Version0.5.2 Version0.5.1 Version0.5 Version0.4 Version0.3.1 Version0.3 Version0.2 Version0.1 ProjectLinks Donate PyPIReleases SourceCode IssueTracker Website Twitter Chat Contents WelcometoFlask User’sGuide APIReference AdditionalNotes Quicksearch
延伸文章資訊
- 1Flask實作_基礎_01_建立第一個app
tags: python flask. 在Flask中,要建置一個網頁或是api並不是難事,難的事通常不會是這個,而 ...
- 2Python Flask 入門指南: 輕量級網頁框架教學
from flask import Flask app = Flask(__name__) @app.route("/") def hello(): return "Hello, World!"...
- 3pallets/flask: The Python micro framework for building ... - GitHub
Flask is a lightweight WSGI web application framework. It is designed to make getting started qui...
- 4使用Python 和Flask 建立AI Web 應用程式- Learn - Microsoft ...
學習目標. 在本課程模組中,您將使用Flask 和認知服務以建置翻譯文字的網站。 了解如何設定 ...
- 5Welcome to Flask — Flask Documentation (2.0.x)
The rest of the docs describe each component of Flask in detail, with a full reference in the API...