Chapter 1: First Steps
Tutorial
- Chapter 1 — First Steps
- Chapter 2 — Data Models
- Chapter 3 — Contexts
- Chapter 4 — Interfaces
- Chapter 5 — Finale
Intro
The best way to learn is by doing, so let's get some hands-on experience and cover a straightforward service with automated tests - a chat platform that allows registered users to communicate with each other. To get started, we'll take a look at the API documentation, which outlines the various requests and data formats needed to interact with the chat service.
Here's an overview of the key API endpoints that we'll be working with:
| Method | Description |
|---|---|
POST /auth/register | Register a new user with a username and password |
POST /auth/login | Authenticate an existing user |
POST /chats/<chat_id>/messages | Send a message to a chat with the specified chat_id. A new chat will be created if it doesn't already exist |
GET /chats/<chat_id>/messages | Retrieve messages for a chat with the specified chat_id |
To ensure an uninterrupted learning experience without getting sidetracked by dependency installations, let's proceed with installing everything we need.
# Install the required packages using pip
$ pip install vedro httpx
# Install the necessary plugins
$ vedro plugin install vedro-d42-validator