- Building RESTful Python Web Services
- Gastón C. Hillar
- 206字
- 2021-08-20 10:24:23
Summary
In this chapter, we designed a RESTful API to interact with a simple SQLite database and perform CRUD operations with games. We defined the requirements for our API and we understood the tasks performed by each HTTP method. We learned the advantages of working with lightweight virtual environments in Python and we set up a virtual environment with Django REST Framework.
We created a model to represent and persist games and we executed migrations in Django. We learned to manage serialization and serialization of game instances into JSON representations with Django REST Framework. We wrote API views to process the different HTTP requests and we configured the URL patterns list to route URLs to views.
Finally, we started the Django development server and we used command-line tools to compose and send HTTP requests to our RESTful API and analyzed how each HTTP request was processed in our code. We also worked with GUI tools to compose and send HTTP requests.
Now that we understand the basics of Django REST Framework, we will expand the capabilities of the RESTful Web API by taking advantage of the advanced features included in the Django REST Framework, which is what we are going to discuss in the next chapter.
- 大學(xué)計(jì)算機(jī)基礎(chǔ)(第三版)
- The DevOps 2.3 Toolkit
- 圖解Java數(shù)據(jù)結(jié)構(gòu)與算法(微課視頻版)
- JavaScript語(yǔ)言精髓與編程實(shí)踐(第3版)
- Mastering Ember.js
- Learning Elixir
- Oracle 12c中文版數(shù)據(jù)庫(kù)管理、應(yīng)用與開發(fā)實(shí)踐教程 (清華電腦學(xué)堂)
- 21天學(xué)通C++(第6版)
- Java程序設(shè)計(jì)
- Mastering Unity 2D Game Development(Second Edition)
- Java零基礎(chǔ)實(shí)戰(zhàn)
- Mastering SciPy
- Enterprise Application Architecture with .NET Core
- Web前端開發(fā)技術(shù)實(shí)踐指導(dǎo)教程
- 面向?qū)ο蠓治雠c設(shè)計(jì)(第3版)