Getting started - websockets 10.1 documentation
Description: Requirements: websockets requires Python ≥ 3.7. It doesn’t have any dependencies. Installation: Install websockets with: Wheels are available for all platforms. Tutorial: Learn how to build an real...

Hide navigation sidebar
Hide table of contents sidebar
Toggle table of contents sidebar

# Getting started

## Requirements

websockets requires Python ≥ 3.7.

Use the most recent Python release

For each minor version (3.x), only the latest bugfix or security release (3.x.y) is officially supported.

It doesn’t have any dependencies.

## Installation

Install websockets with:

    $ pip install websockets

Wheels are available for all platforms.

## Tutorial

Learn how to build an real-time web application with websockets.

- Part 1 - Send & receive
  - Prerequisites
  - Download the starter kit
  - Bootstrap the web UI
  - Bootstrap the server
  - Transmit from browser to server
  - Transmit from server to browser
  - Add the game logic
  - Summary
  - Solution
- Part 2 - Route & broadcast
  - Share game state
  - Start a game
  - Join a game
  - Add the game logic
  - Watch a game
  - Broadcast
  - Summary
  - Solution
- Part 3 - Deploy to the web
  - Commit project to git
  - Prepare the WebSocket server
  - Deploy the WebSocket server
  - Prepare the web application
  - Deploy the web application
  - Summary
  - Solution

## In a hurry?

Check out these examples.

- Quick start
  - Hello world!
  - Encryption
  - In a browser
  - Broadcast