Apress.Building.REST.APIs.with.Flask.pdf

所需积分/C币:19 2019-09-16 13:29:07 4.51MB PDF
收藏 收藏
举报

Apress.Building.REST.APIs.with.Flask.pdf Apress.Building.REST.APIs.with.Flask.pdf
Building REST APIs with Flask: Create Python Web Services with MysQL Kunal relan New Delhi, Delhi, India ISBN-13(pbk):978-1-4842-5021-1 ISBN-13( (electronic:978-1-4842-5022-8 https://doi.org/10.1007/978-1-4842-5022-8 Copyright o 2019 by Kunal Relan This work is subject to copyright All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way and transmission or information storage and retrieval, electronic adaptation, computer software or by similar or dissimilar methodology now known or hereafter developed Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights While the advice and information in this book are believed to be true and accurate at the date of publication, neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made. The publisher makes no warranty, express or implied, with respect to the material contained herein Managing Director, Apress Media LLC: Welmoed Spahr Acquisitions Editor: Nikhil Karkal Development Editor: Laura Berendson Coordinating Editor: Divya Modi Cover designed by eStudio calamar CoverimagedesignedbyFreepik(www.freepik.com) Distributed to the book trade worldwide by Springer Science+Business Media New York 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax(201)348-4505 e-mailorders-ny@springer-sbm.com,orvisitwww.springeronline.comApressMedia,Llcisa California LLC and the sole member(owner)is Springer Science Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation Forinformationontranslationspleasee-mailrights@apress.com,orvisithttp://www.apress com/rights-permissions apress titles may be purchased in bulk for academic, corporate or promotional use eBook versions and licenses are also available for most titles. for more andebooKBulkSaleswebpageathttp://www.apress.com/bulk-saleationreferenceourPrint Any source code or other supplementary material referenced by the author in this book is available toreadersonGithubviathebooksproductpagelocatedatwww.apress.com/9781484250211 Formoredetailedinformationpleasevisithttp://www.apress.com/source-code Printed on acid-free paper Dedicated to caffeine and sugar, my companions through many long night of writing, and extra credits to my mom Table of contents About the author ■■■■■■■■■■■■■口■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■口■■■■■■■■■■■■■■■■■■■■■■■■■■口■■■■ About the technical reviewer Acknowledgments Introduction Chapter1: Beginning with Flask…,,,…,…,1 Introduction to Flask Starting Flask Flask Components Covered in This Book Introduction to restful services Uniform Interface 重■重DD重日重重D重重面D目日面重重DD重 23478 Representations…….8 Messages..............9 Links between resources ■Dm 12 Caching………………………13 Stateless.…13 Planning REST API 144 API Design…...................…,15 Setting Up Development Environment. Working with PIP Choosing the IDE 18 Understanding Python Virtual Environments...............19 TABLE OF CONTENTS Setting Up Flask. Installing flask Conclusion Chapter 2: Database Modeling in Flask.mana ■■■■■■■■■■■■■■■■■■■■■■■■■■■口■■■■ 27 Introduction SQL Databases….8 NoSQL Databases…128 Key Differences: MySQL VS MongoDB Creating a Flask Application with SQLAlchemy .. Creating an Author database Sample Flask Mongo Engine Application 46 Conclusion…,158 Chapter 3: CRUD Application with Flask (Part 1)aaa59 User authenticate0n…88 Conclusion…96 Chapter 4: CRUD Application with Flask (Part 2) ■■■■■■■■■■■■■■■■■国■■■■■口■■■■ 97 ntroduction,…,…… 97 Email verification File Upload.…, 109 APl Documentation 114 Building blocks of APl Documentation D国■ 115 OpenaPl specification ammnaanamemamnmmmn 116 Conclusion ,134 TABLE OF CONTENTS Chapter 5: Testing in Flask mammmmammmmmma. 135 Introduction 135 Setting up Unit Tests . Unit Testing User Endpoints 139 Test Coverage. Conclusion mmmm, 157 Chapter 6: Deploying Flask Applications amraam 159 Deploying Flask with uWSGl and Nginx on Alibaba cloud ECs.mmmm 160 Deploying Flask on Gunicorn with Apache on Alibaba Cloud ECS.m.m... 167 Deploying Flask on AWS Elastic Beanstalk.mmeame. 172 Deploying Flask App on Heroku 176 Adding a Procfile Deploying Flask App on Google App Engine ■日重DD重 180 Conclusion 182 Chapter 7: Monitoring Flask Applications mmmmmaaaaanmn 183 Application Monitoring Sentry...eeeennoanano …185 Flask Monitoring Dashboard 187 New re!iC…189 Bonus services gu, 192 Conclusion 194 Index 195 About the author Kunal relan is an ioS security researcher and a full stack developer with more than four years of experience in various fields of technology, including network security. DevOps, cloud infrastructure, and application development, working as a consultant with start-ups around the globe. He is an Alibaba Cloud mvp and author ofis penetration Testing(Apress )and a variety of white papers Kunal is a technology enthusiast and an active speaker. He regularly contributes to open source communities and writes articles for Digital Ocean and Alibaba Techshare About the technical reviewer Saurabh Badhwar is a software engineer with a passion to build scalable distributed systems. He is mostly working to solve challenges related to performance of software at a large scale and has been involved in building solutions that help other developers quickly analyze and compare performance of their systems when running at scale He is also passionate about working with open source communities and has been actively participating as a contributor in various domains, which involve development, testing, and community engagement. Saurabh has also been an active speaker at various conferences where he has been talking about performance of large-scale systems Acknowledgments I would like to thank Apress for providing me this platform, without which this would have been a lot harder. i would also like to thank mr. nikhil Karkal for his help and Miss Divya Modi for her perseverance, without whom this would have been a farsighted project I'd like to mention about the strong Python community which helped me understand the core concepts in my early years of programming, which inspired me to contribute back to the community with this book. Last but certainly not the least, I would like to acknowledge all the people who constantly reminded me about the deadlines and helped me write this book, especially my family and Aparna abhijit for helping me out with editing

...展开详情
试读 127P Apress.Building.REST.APIs.with.Flask.pdf
立即下载 低至0.43元/次 身份认证VIP会员低至7折
    抢沙发
    一个资源只可评论一次,评论内容不能少于5个字
    img
    qq_20074281
    • 分享王者

      成功上传51个资源即可获取

    关注 私信 TA的资源

    上传资源赚积分,得勋章
    最新推荐
    Apress.Building.REST.APIs.with.Flask.pdf 19积分/C币 立即下载
    1/127
    Apress.Building.REST.APIs.with.Flask.pdf第1页
    Apress.Building.REST.APIs.with.Flask.pdf第2页
    Apress.Building.REST.APIs.with.Flask.pdf第3页
    Apress.Building.REST.APIs.with.Flask.pdf第4页
    Apress.Building.REST.APIs.with.Flask.pdf第5页
    Apress.Building.REST.APIs.with.Flask.pdf第6页
    Apress.Building.REST.APIs.with.Flask.pdf第7页
    Apress.Building.REST.APIs.with.Flask.pdf第8页
    Apress.Building.REST.APIs.with.Flask.pdf第9页
    Apress.Building.REST.APIs.with.Flask.pdf第10页
    Apress.Building.REST.APIs.with.Flask.pdf第11页
    Apress.Building.REST.APIs.with.Flask.pdf第12页
    Apress.Building.REST.APIs.with.Flask.pdf第13页
    Apress.Building.REST.APIs.with.Flask.pdf第14页
    Apress.Building.REST.APIs.with.Flask.pdf第15页
    Apress.Building.REST.APIs.with.Flask.pdf第16页
    Apress.Building.REST.APIs.with.Flask.pdf第17页
    Apress.Building.REST.APIs.with.Flask.pdf第18页
    Apress.Building.REST.APIs.with.Flask.pdf第19页
    Apress.Building.REST.APIs.with.Flask.pdf第20页

    试读已结束,剩余107页未读...

    19积分/C币 立即下载 >