REST APIs with Django
REST APIs with Django
$39.99
Minimum
$39.99
Suggested
REST APIs with Django

This book is 100% complete

Completed on 2018-09-07

About the Book

Newly updated for Django 2.1 and Python 3.7.

REST APIs with Django teaches how to build robust web APIs with Python and Django. An existing Django site can be transformed into an API in a matter of minutes but in this book we'll go well beyond the basics and build three progressively more complex APIs: a Library APITodo API connected to a React front-end, and a Blog API featuring user authentication, permissions, documentation, and more.

TABLE OF CONTENTS

  • Introduction
  • Chapter 1: Web APIs
  • Chapter 2: Library website and API
  • Chapter 3: Todo API
  • Chapter 4: Todo React Front-end
  • Chapter 5: Blog API
  • Chapter 6: Permissions
  • Chapter 7: User Authentication
  • Chapter 8: Viewsets and Routers
  • Chapter 9: Schemas and Documentation

Table of Contents

  • Introduction
    • Prerequisites
    • Why APIs
    • Django REST Framework
    • Why this book
    • Conclusion
  • Chapter 1: Web APIs
    • World Wide Web
    • URLs
    • Internet Protocol Suite
    • HTTP Verbs
    • Endpoints
    • HTTP
    • Status Codes
    • Statelessness
    • REST
    • Conclusion
  • Chapter 2: Library Website and API
    • Traditional Django
    • First app
    • Models
    • Admin
    • Views
    • URLs
    • Webpage
    • Django REST Framework
    • URLs
    • Views
    • Serializers
    • cURL
    • Browsable API
    • Conclusion
  • Chapter 3: Todo API
    • Initial Set Up
    • Models
    • Django REST Framework
    • URLs
    • Serializers
    • Views
    • Consuming the API
    • Browsable API
    • CORS
    • Conclusion
  • Chapter 4: Todo React Front-end
    • Install Node
    • Install React
    • Mock data
    • Django REST Framework + React
    • Conclusion
  • Chapter 5: Blog API
    • Initial Set Up
    • Model
    • Tests
    • Django REST Framework
    • URLs
    • Serializers
    • Views
    • Browsable API
    • Conclusion
  • Chapter 6: Permissions
    • Create a new user
    • Add log in to the browsable API
    • AllowAny
    • View-Level Permissions
    • Project-Level Permissions
    • Custom permissions
    • Conclusion
  • Chapter 7: User Authentication
    • Basic Authentication
    • Session Authentication
    • Token Authentication
    • Default Authentication
    • Implementing token authentication
    • Endpoints
    • Django-Rest-Auth
    • User Registration
    • Tokens
    • Conclusion
  • Chapter 8: Viewsets and Routers
    • User endpoints
    • Viewsets
    • Routers
    • Conclusion
  • Chapter 9: Schemas and Documentation
    • Schemas
    • Documentation
    • Django REST Swagger
    • Conclusion
  • Conclusion
    • Next Steps
    • Giving Thanks
  • Acknowledgements

About the Author

William S. Vincent
William S. Vincent

William S. Vincent is the author of Django for Beginners and REST APIs with Django. Previously an early employee at Quizlet, he has used Django at multiple early-stage startups in the Boston area and taught computer science at Williams College. He writes regularly about Python and JavaScript at wsvincent.com.

Other books by this author

The Leanpub 45-day 100% Happiness Guarantee

Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Write and Publish on Leanpub

Authors and publishers use Leanpub to publish amazing in-progress and completed ebooks, just like this one. You can use Leanpub to write, publish and sell your book as well! Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks. Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. It really is that easy.

Learn more about writing on Leanpub