BuildingRESTfulPythonWebServices无水印pdf
Building RESTful Python Web Services 英文无水印pdf pdf所有页面使用FoxitReader和PDF-XChangeViewer测试都可以打开 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请联系上传者或csdn删除Table of contentsBuilding rEstful Python Web serviceseditsabout the authorAcknowledgmentsabout the reviewerwww.Packtpub.comWhy subscribe?PrefaceWhat this book coversWhat you need for this bookWho this book is forConventionsReader feedbackCustomer supportDownloading the example codeErrataracyQuestions1. Developing RESTful APIs with DjangoDesigning a RESTful APi to interact with a simple SQLite databaseUnderstandingthetasksperformedbyeachhttpmethodWor king with lightweight virtual environmentsSetting up the virtual environment with Diango rest frameworkCreating the modelsManaging serialization and deserializationWriting apl viewsMakinghttprequeststotheApiWorkingwithcommand-linetools-curlandhttpieWorking with GUI tools-Postman and othersTest your knowledgeSummar2. Working with Class-Based views and Hyper linked APIs in DjangoUsing model serializers to eliminate duplicate codeWorking with wrappers to write API viewsUsing the default parsing and rendering options and move beyond SONBrowsing the APIDesigning a RESTful API to interact with a complex PostgreSQL databaseUnderstanding the tasks performed by each Http methodDeclaring relationships with the modelsManaging serialization and deserialization with relationships and hyperlinksCreating class-based views and using generic classesTaking advantage of generic class based viewsWorking with endpoints for the ApiCreating and retrieving related resourcesTest your knowledgeSummary3. Improving and Adding Authentication to an API With DjangoAdding unique constraints to the modelsUpdating a single field for a resource with the patch methodTaking advantage of paginationCustomizing pagination classesUnderstanding authentication, permissions and throttlingAdding security-related data to the modelsCreating a customized permission class for object-level permissionsPersisting the user that makes a requestConfiguring permission policiesSetting a default value for a new required field in migrationsComposing requests with the necessary authenticationBrowsing the Apl with authentication credentialsTest your knowledgeSummary4. Throttling, Filtering, Testing, and Deploying an API with DiangoUnderstanding throttling classesConfiguring throttling policiesTesting throttling policiesUnderstanding filtering, searching and ordering classesConfiguring filtering, searching, and ordering for viewsTesting filtering, sear ching. and orderingFiltering, searching, and ordering in the Browsable APSetting up unit testsWriting a first round of unit testsRunning unit tests and checking testing coverageImproving testing coverageUnderstanding strategies for deployments and scalabiliTest your knowledgeSummar5. Developing restful aPis with FlaskDesigning a RESTful aPI to interact with a simple data sourceUnderstandingthetasksperformedbyeachhttpmethodSetting up a virtual environment with Flask and Flask-RESTiulDeclaring status codes for the responsesCreating the modelUsing a dictionary as a repositoryConfiguring output fieldsWorking with resourceful routing on top of Flask pluggable viewsConfiguring resource routing and endpointsMakinghttprequeststotheflaskapLWorkingwithcommand-linetoolsacurlandhttpieWorking with GUI tools- Postman and othersTest your knowledgeSummary6. Working with Models, SQLAlchemy, and Hyperlinked APIs in FlaskDesigning a resTful api to interact with a PostgreSQL databaseUnderstanding the tasks performed by each Http mEthodInstalling packages to simplify our common tasksCreating and configuring the databaseCreating models with their relationshipsCreating schemas to validate, serialize, and deserialize modelsCombining blueprints with resourceful routingRegistering the blueprint and running migrationsCreating and retrieving related resourcesTest your knowledgeSummar7. Improving and Adding Authentication to an API with FlaskImproving unique constraints in the modelsUpdating fields for a resource with the PATCH methodCoding a generic pagination classAdding pagination featuresUnderstanding the steps to add authentication and permissionsAdding a user modelCreating a schemas to validate, serialize, and deserialize usersAdding authentication to resourcesCreating resource classes to handle usersRunning migrations to generate the user tableComposing requests with the necessary authenticationTest your knowledgeSummar8. Testing and Deploying an APi with FlaskSetting up unit testsWriting a first round of unit testsRunning unit tests with nose and checking testing coverageImproving testing coveragenderstanding strategies for deployments and scalabilityTest your knowledgeSummary9. Developing restful aPis with TornadoDesigning a RESTful aPi to interact with slow sensors and actuatorsUnderstanding the tasks performed by each Http methodSetting up a virtual environment with TornadoDeclaring status codes for the responsesCreating the classes that represent a droneWriting request handlersMapping uRL patterns to request handlersMakinghttprequeststotheTornadoApiWorkingwithcommand-linetoolsacurlandhttpieWorking with gUI tools-Postman and othersTest your knowledgeSummary10. Wor king with Asynchronous Code, Testing, and Deploying an APi with TornadoUnderstanding synchronous and asynchronous executionRefactoring code to take advantage of asynchronous decoratorsMapping url patterns to asynchronous request handlersMakinghttprequeststotheTornadonon-blockingApSetting up unit testsWriting a first round of unit testsRunning unit tests with nose 2 and checking testing coveragemproving testing coverageOther Python Web frameworks for building RESTful APIsTest your knowledgeSummar11. Exercise answersChapter 1, Developing restful APIs with DjangoChapter 2, working with Class-Based views and Hyperlinked APIs in DjangoChapter 3, Improving and Adding Authentication to an API With DjangoChapter 4, Throttling Filtering Testing and Deploying an APi with DiangoChapter 5, Developing restful APIs with FlaskChapter 6, Working with Models, sQLAlchemy, and Hyperlinked APIs in FlaskChapter 7, Improving and Adding Authentication to an APl with FlaskChapter 8, Testing and Deploying an apI with FlaskChapter 9, Developing restful APIs with TornadoChapter 10, Working with Asynchronous Code, Testing, and Deploying an API withornateBuilding restful python Web servicesBuilding restful python Web servicesCopyright c 2016 Packt PublishingAll rights reserved. No part of this book may be reproduced, stored in a retrieval system, ortransmitted in any form or by any means, without the prior written permission of thepublisher, except in the case of brief quotations embedded in critical articles or reviewsEvery effort has been made in the preparation of this book to ensure the accuracy of theinformation presented however, the information contained in this book is sold withoutwarranty, either express or implied. Neither the author, nor Packt Publishing, and its dealersand distributors will be held liable for any damages caused or alleged to be caused directly orindirectly by this bookPackt Publishing has endeavored to provide trademar k information about all of thecompanies and products mentioned in this book by the appropriate use of capitals. However,Packt Publishing cannot guarantee the accuracy of this informationFirst published: October 2016Production reference: 1201016Published by Packt Publishing ltdLivery place35 Livery streetBirminghamB3 2PB. UKISBN978-1-78646-225-1www.packtpub.comCreditsAuthorCopy EditorGaston C HillarSneha SinghReviewerProject CoordinatorElmer thomasSheejal ShahCommissioning EditorProofreaderAaron lazarSafis EditingAcquisition EditorIndexerReshma RamanRekha nairContent Development EditorGraphicsDivij KotianJason MonteiroTechnical editorProduction CoordinatorGebin georgeMelwyn dsaAbout the authorGaston C. Hillar is Italian and has been working with computers since he was eight. He beganprogramming with the legendary Texas Tl-99/4A and Commodore 64 home computers in theearly 80s. He has a Bachelor's degree in Computer Science from which he graduated withhonors, and an mba from which he graduated with an outstanding thesis. at present, gastonis an independent it consultant and freelance author who is always looking for newadventures around the worldHe has been a senior contributing editor at Dr. dobbs and has written more than a hundredarticles on software development topics. Gaston was also a former Microsoft MVP intechnical computing. He has received the prestigious lntel r black belt Software developeraward eight timesHeisaguestbloggeratInteleSoftwareNetwork(http:/lsoftwareintel.com).Youcanreachhimatgastonhillar@hotmail.comandfollowhimonTwitterathttp://twitter.com/gastonhillarGaston'sblogishttp://csharpmulticore.blogspot.comHe lives with his wife. Vanesa, and his two sons Kevin and brandon
暂无评论