1. 首页
  2. 编程语言
  3. Python
  4. Flask Blueprints

Flask Blueprints

上传者: 2019-10-10 21:46:10上传 PDF文件 1.91MB 热度 97次
Dive into the world of the Flask microframework to develop an array of web applications, About This Book, Structure, compose, and build powerful Flask HTML-based applications and JSON/XML-based APIs using advanced application design patternsIntegrate third-party Flask extensions for tasks such as soFlask blueprintsCopyright o 2015 Packt PublishiingAll rights reserved. No part of this book may be reproduced, stored in a retrievalsystem, or transmitted in any form or by any means, without the prior writtenpermission of the publisher, except in the case of brief quotations embedded incritical articles or reviewsrt has been made in the preparation of this book to ensure the accuracyof the information presented However the information contained in this book issold without warranty, cither express or implied. Neither the author nor PaclPublishing and its dealers and distributors will be held liable for any damagescaused or alleged to be caused directly or indirectly by this bookPackt Publishing has endeavored to provide trademark information about all of thecompanies and products mentioned in this book by the appropriate use of capitalsHowever, Packt Publishing cannot guarantee the accuracy of this informationFirst published: November 2015Production reference: 1251115Published by Packt Publishing ltdLivery place35 Livery streetBirmingham B3 2PB, UKISBN978-1-78439478-3www.packtpub.comCreditsAuuthorProject CoordinatorJoel perrasSanjeet RaoReviewersProofreaderShalabh aggarwalSafis EditingChristoph HeerAndreas porevopoulosIndexerMonica Ajmera MehtCommissioning editorJulian urse‖lGraphicsDisha hariaAcquisition EditorMeeta rajaniProduction coordinatorNilesh r. mohiteContent Development EditorShweta PantCover workNileshr. mohiteTechnical editorBharat patilCopy EditorTasneem fatehiAbout the authorJoel Perras has been professionally involved in technology and computingfor over 12 years. He got his start in the world of programming by attemptingto teach himself Java at the tender age of 13 and got his first job at a small webdevelopment firm a few years later writing Java Server Pages. The first site hebuilt is still runningWhile studying physics and mathematics at McGill University in Montreal,he helped set up a Tier II analysis centre for the Worldwide LHC ComputingGrid, which cemented his interest in distributed systems architecture and highperformance computingCurrently, his days are spent building infrastructure and Python applications withthe incredible people at Fictive Kin, writing open source code, and trying to liftheavy weights over his head on a regular basisI'd like to thank Sara for her infinite patience throughout theprocess of writing this lengthy technical manual and my coworkersat Fictive Kin for dealing with my particularly bad sense of humoron a daily basisAbout the reviewersShalabh aggarwal has several years of experience in developing business systemsnd web applications for small-to-medium scale industries. He started his careerworking on Python, and although he works on multiple technologies, he remainsa Python developer at heart. Ile is passionate about open source technologies andwrites highly readable and quality codeShalabh is also active in voluntary training for engineering students ornonconventional and open source topics. When not working with full-timeassignments, he acts as a consultant for start-ups on leveraging differenttechnologies. He is pursuing his master's degree in business from IIT DelhiI would like to thank my family, my mother, and my sister forputting up with me during my long writing and research sessions. Iwould also like to thank my friends and colleagues who encouragedme and kept the momentum going. I would like to thank arminRonacher for developing this wonderful web frameworkChristoph heer is a passionate python developer based in germany. he likes todevelop web applications and also tools and systems for infrastructure optimizationmanagement, and monitoring. He is proud to be a part of the great Pythoncommunity and wishes to have more time for open source contributionAndreas Porevopoulos has loved computers and programming since he was inhigh school and over the years he has developed many apps in different languagesand systems but python was always his favorite he has been working as a fullStack Python developer for the last 7 years and has completed lots of projects inDjango and flask. He believes that these two frameworks are among the best for webapp development.The agile practices that he uses for all his developing/deploying needs are Git,Ansible, Vagrant, and DockerWww.Packtpub.comSupport files, eBooks, discount offers, and moreForsupportfilesanddownloadsrelatedtoyourbookpleasevisitwww.packtpub.Com.Did you know that packt offers e Book versions of every book published, with pDFandepuBfilesavailableYoucanupgradetotheebookversionatwww.Packtpubom and as a print book customer you are entitled to a discount on the e book copyGet in touch with us at service@packtpub com for more detailsAtwww.Packtpub.comyoucanalsoreadacollectionoffreetechnicalarticlessignup for a range of free newsletters and receive exclusive discounts and offers on Packtbooks and ebooksPACKTLIBhttps://www2.packtpub.ccm/books/subscription/packtlibDo you need instant solutions to your It questions? PacktLib is Packt's online digitalbook library. Here, you can search, access, and read Packt's entire library of booksWhy subscribe?Fully searchable across every book published by PacktCopv and paste, print, and bookmark contentOn demand and accessible via a web browserFree access for Packt account holdersIfyouhaveanaccountwithpacktatwww.Packtpub.comyoucanusethistoaccessPacktlib today and view entirely free books Simply use your login credentials forimmediate accessTable of contentsPrefaceChapter 1: Starting on the Right Foot- Using virtualenvSetuptools and pipAvoiding dependency hell, the Python way5Working with virtualenvCreating a new virtual environmentActivating and deactivating virtual environmentsAdding packages to an existing environmentUninstalling packages from an existing environmentSimplifying common operations-using the virtualenvwrapper tooSummary10Chapter 2: Small to Big-Growing the Flask Application Structure 11Your first Flask application structure11From module to package13From package to blueprintOur first blueprint18SummaryChapter 3: Snap-the Code Snippet Sharing Application21Getting startedFlask-SQLAIchemy22Configuring Flask-SQLAlchemySQLAlchemy basics24Snap data models29Flask-Login and Flask-Bcrypt for authentication31Flask-WTF-form validation and rendering32lashing user passwordsConfigure an application SECRET KEYHook up the blueprintet' s run this thin40
用户评论