Examples

These examples illustrate the ways in which OpenAPI programming in Python differs from using C. They are presented in no particular order.

For comprehensive instruction in the workings of the OpenAPI refer to the OpenAPI User Guide.

Most of the examples here are only illustrative fragments of code, not complete applications. See Hello Pyngres for an example of a complete but trivial application that can be used as a starting point for experimentation.

Note

Basic knowledge of asyncio is assumed for some of the examples.

Tip

The usefulness of asyncio is hard to overstate. Every Python programmer would benefit from familiarity with it. One excellent resource is Python Asyncio: The Complete Guide, maintained by Jason Brownlee. The content is also available as a book entitled Python Asyncio Jump-Start, ISBN-13: 979-8361197620.