ENGLISH

Web API Development with Python: A Beginner's Guide using Flask and FastAPI (Intermediate Python)

Book information

Year
2021
Language
english
Format
PDF
Filesize
3 MB (2728873 bytes)
Pages
\127
Time added
2022-01-06 14:48:32

Description

Completely updated for Flask 2.0.1 and FastAPI 0.65.2 This book is a hands-on project based guide to building APIs designed for beginners who have never built an API before or professionals who want a quick intro to FastAPI or Flask. The book uses Python libraries such as Flask microframework that is used by the likes of Netflix, Airbnb, Uber, Instagram, etc. making its way up to modern framework like FastAPI, which is on par to any with NodeJS, and Go in terms of performance and quickly being adopted as the #1 API tools written in Python. You will also learn efficient routing, type-hinting, data transfer, HTTP messages, form data handling, REST API design, and data validation techniques. In this book you will learn Fundamentals of APIs Introduction to tools for API development Flask backend development using REST architecture Connect to Front-end designed using Jinja2 templates FastAPI backed / API design Asynchronous API development Table of Contents Prerequisites 1. Internet 2. Accounts 3. Operating System 4. Python 5. Terminal 6. Text Editor / IDE 7. Git for Version Control 8. Docker for Desktop (Optional) 9. Jupyter Notebook Chapter 1: Introduction to Web APIs 1.1 What is API? 1.2 Types of APIs 1.3 What is a Web API? 1.4 Getting our hands dirty 1.5 Getting hands dirty programmatically 1.6 JavaScript Object Notation (JSON) 1.7 Why are APIs needed? 1.8 API Design Patterns Chapter 2: Python & Working with APIs 2.1 Programmatically accessing an API Chapter 3: Building APIs with Flask 3.1 Initialise the development environment 3.2 Understanding the Starter Kit 3.3 Initialising the starter kit 3.3 A minimal Flask API 3.3 Explanation 3.5 Running the API 3.6 Call the API Programmatically 3.7 JSONIFY the response Chapter 4: Building interactive APIs 4.1 Capturing request arguments 4.2 Explanation 4.3 Testing the API 4.4 Catching sneaky behaviour and errors 4.4 Handling incorrect API requests Chapter 5: Multi-argument interactive API 5.1 Capturing multiple arguments 5.2 Explanation 5.3 Testing the API 5.4 Reader Challenge Chapter 6. Google search as an API 6.1 An informal introduction to URL and Querystring 6.2 What can we do with this information? 6.3 Understanding the Starter Kit 6.4 Logic of the application 6.5 Rendering home page 6.6 Returning Search Results 6.7 Explanation 6.8 Student Challenge Chapter 7: Building a Dictionary API 7.1 Understanding the Starter Kit 7.2 Logic of the application 7.3 Handle incoming searches 7.4 Finding the definition of the word 7.5 Handling list of words 7.6 Testing the API 7.7 Student Challenge 7.8 Jupyter Notebook to test the API Chapter 8: Building a POST API 8.1 API to add Filters 8.2 Understanding the Starter Kit 8.3 Logic of the application 8.4 Implementing the Filter 8.5 Testing the API 8.6 Getting filtered image 8.7 Bonus Challenge #2 Chapter 9: Bonus Lesson: Deploying the API 9.1 Configuring the CD Pipeline 9.2 Testing the API 9.3 Pro Tip: Testing using Terminal 9.4 Bonus Challenge Chapter 10: Introducing FastAPI 10.1 Asynchronous Programming 10.2 Enter FastAPI 10.3 Understanding the Starter Kit 10.4 Saying Hello FastAPI Chapter 11: Dictionary using FastAPI 11.1 Understanding the Starter Kit 11.2 Implementing the usage instructions 11.3 Implementing the dictionary 11.4 Testing the API 11.5 : FastAPI OpenAPI Docs and Swagger UI 11.6 Handling a list of words 11.7 Testing The API Chapter 12: Image filters using FastAPI 12.1 Bonus: Deployment to Heroku Chapter 13: FastAPI async / await 13.1 Making the program asynchronous 13.2 Making the filter API asynchronous 13.3 Test Scenario 1 13.4 Test Scenario 2 13.5 Test scenario 3 13.6 Test Scenario 4 13.7 Conclusion 13.8 Bonus Challenge Chapter 14: Making a TODO API 14.1 API Specifications 14.2 Initialise the environment 14.3 Understanding the starter kit 14.4 Request Body and Data Validation 14.5 Data Model for TODO 14.6 Task manager 14.7 Building the API 14.8 Final API design 14.9 Testing the API 14.10 Where to from here? Au Revoir About the Author Acknowledgements

Similar books

Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36

Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36

2010 · PDF

THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.

THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.

1858 · PDF

Idries Shah 27 Books Collection : A Perfumed Scorpion, A Veiled Gazelle, Caravan of Dreams, Darkest England, Destination Mecca, Evenings with Idries Shah, Knowing How to Know, Learning How to Learn, Letters and Lectures of Idries Shah, Neglected aspects of Sufi study, Observations, Oriental Magic, Reflections, Seeker after Truth, Special Illumination, Special Problems in the study of Sufi ideas, Sufi thought and action, Tales of the Dervishes, The Dermis Probe, The Elephant in the Dark, The Englishman Handbook, Idries Shah Antology, The Magic Monastery, The natives are restless, wisdom of the Idiots PDF.

Idries Shah 27 Books Collection : A Perfumed Scorpion, A Veiled Gazelle, Caravan of Dreams, Darkest England, Destination Mecca, Evenings with Idries Shah, Knowing How to Know, Learning How to Learn, Letters and Lectures of Idries Shah, Neglected aspects of Sufi study, Observations, Oriental Magic, Reflections, Seeker after Truth, Special Illumination, Special Problems in the study of Sufi ideas, Sufi thought and action, Tales of the Dervishes, The Dermis Probe, The Elephant in the Dark, The Englishman Handbook, Idries Shah Antology, The Magic Monastery, The natives are restless, wisdom of the Idiots PDF.

2022 · PDF

The travels of Capts. Lewis and Clarke from St. Louis, by way of the Missouri and Columbia rivers, to the Pacific ocean; performed in the years 1804, 1805 & 1806, by order of the government of the United States. Containing delineations of the manners, customs, religion, &c. of the Indians, comp. from various authentic sources, and original documents, and a summary of the Statistical view of the Indian nations, from the official communication of Meriwether Lewis. Illustrated with a map of the country, inhabited by the western tribes of Indians

The travels of Capts. Lewis and Clarke from St. Louis, by way of the Missouri and Columbia rivers, to the Pacific ocean; performed in the years 1804, 1805 & 1806, by order of the government of the United States. Containing delineations of the manners, customs, religion, &c. of the Indians, comp. from various authentic sources, and original documents, and a summary of the Statistical view of the Indian nations, from the official communication of Meriwether Lewis. Illustrated with a map of the country, inhabited by the western tribes of Indians

1809 · PDF

Professional Linux kernel architecture ''Wrox programmer to programmer''--Cover. - ''What you are reading right now is the result of an evolution over more than seven years: After two years of writing, the first edition was published in German by Carl Hanser Verlag in 2003. It then described kernel 2.6.0. The test was used as a basis for the low-level design documentation for the EAL4+ security evaluation of Red Hat Enterprise Linux 5, requiring to update it to kernel 2.6.18 (if the EAL acronym does not mean anything to you, then Wikipedia is once more your friend). Hewlett-Packard sponsored the translation into English and has, thankfully, granted the rights to publish the result. Updates to kernel 2.6.24 were then performed specifically for this book''--P. ix

Professional Linux kernel architecture ''Wrox programmer to programmer''--Cover. - ''What you are reading right now is the result of an evolution over more than seven years: After two years of writing, the first edition was published in German by Carl Hanser Verlag in 2003. It then described kernel 2.6.0. The test was used as a basis for the low-level design documentation for the EAL4+ security evaluation of Red Hat Enterprise Linux 5, requiring to update it to kernel 2.6.18 (if the EAL acronym does not mean anything to you, then Wikipedia is once more your friend). Hewlett-Packard sponsored the translation into English and has, thankfully, granted the rights to publish the result. Updates to kernel 2.6.24 were then performed specifically for this book''--P. ix

2008 · PDF