- 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.
- Photoshop智能手機APP UI設(shè)計之道
- PHP 從入門到項目實踐(超值版)
- C# Programming Cookbook
- Machine Learning with R Cookbook(Second Edition)
- Instant Zepto.js
- ASP.NET Core 2 and Vue.js
- 匯編語言程序設(shè)計(第2版)
- Mastering Yii
- Symfony2 Essentials
- HTML5+CSS3+jQuery Mobile APP與移動網(wǎng)站設(shè)計從入門到精通
- 大學計算機應(yīng)用基礎(chǔ)(Windows 7+Office 2010)(IC3)
- 從零開始學Python大數(shù)據(jù)與量化交易
- UI動效設(shè)計從入門到精通
- 啊哈C語言!:邏輯的挑戰(zhàn)(修訂版)
- 計算思維與Python編程