Search⌘ K
AI Features

Getting Started with the API of Langman

Explore how to build the Langman REST API by creating placeholder routes, connecting to the database, and managing HTTP methods with Flask. Understand API namespaces, use flask-cors for cross-origin resource sharing, and run the API locally to test unimplemented routes.

Stubbing out the app

In this chapter, we’ll use API design principles. First, we stub out the application, that is, create do-nothing methods as placeholders, and its routes. We then create the database connection and fill in the routes. The configuration parameters are stored in the config.yaml ...