Summary

In this chapter, we designed a RESTful API to interact with a simple data source with Pyramid 1.10. We defined the requirements for our API and understood the tasks performed by each HTTP method. We set up a virtual environment with Pyramid, built a new application from an existing template, and added additional required packages to the Pyramid application.

We created a class that represented a surfboard metric, and additional classes to make it possible to generate a simple data source to allow us to focus on specific Pyramid features to build a RESTful API.

We then created a Marshmallow schema to validate, serialize, and deserialize the metric model. Then, we started working with view callable functions to process specific HTTP verbs on certain resources. We understood and configured view handlers in our Pyramid application.

Finally, we started the Pyramid application in development mode, 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.

Now that we understand the basics of the Pyramid for creating simple RESTful APIs, we will start working with Tornado, which is the topic of the next chapter.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.139.72.78