Metadata-Version: 2.4
Name: departure-server-pygame
Version: 2.0.0
Summary: Pygame Departure board back end
Home-page: https://github.com/spujadas/departure-board-servers-python
Author: Sébastien Pujadas
Author-email: sebastien@pujadas.net
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: departure>=2.0.0
Requires-Dist: pygame
Requires-Dist: websockets>=11.0.3
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# Departure board servers (Python)

> **Note:** The primary board server is the [Go board server](https://github.com/spujadas/departure-board-server-go), which drives the LED matrix on Raspberry Pi and provides a virtual "ASCII" display for development. The Python servers are used as virtual graphic board servers.

This package contains Python board server back ends for the [departure](https://pypi.org/project/departure/) library:

- **Pygame** — virtual display, any platform,
- **SDL2** — virtual display, any platform,
- **LED matrix** — physical board via Raspberry Pi and the Python bindings of the [rpi-rgb-led-matrix](https://github.com/hzeller/rpi-rgb-led-matrix) project. **Replaced by the [Go board server](https://github.com/spujadas/departure-board-server-go)**; the package published on PyPI (1.0.0) is no longer updated, and doesn't work with the current version of departure.

All three back ends receive pixel content and animation instructions from the departure library over WebSocket (MessagePack wire format).



### Installation

**Pygame back end** — on Debian-based Linux, install the system prerequisites first:

```
sudo apt-get install python3-dev libsdl-image1.2-dev libsdl-mixer1.2-dev \
    libsdl-ttf2.0-dev libsdl1.2-dev libsmpeg-dev python-numpy subversion \
    libportmidi-dev ffmpeg libswscale-dev libavformat-dev libavcodec-dev \
    libfreetype6-dev
```

Then install the package:

```
pip install departure-server-pygame
```

**SDL2 back end** — see [PySDL2 prerequisites](https://pysdl2.readthedocs.io/en/latest/install.html#prerequisites). Before starting the server, ensure that `PYSDL2_DLL_PATH` points to the directory containing the SDL2 library (`SDL2.dll` on Windows). Then install:

```
pip install departure-server-sdl
```

**LED matrix back end** — on a Raspberry Pi with compatible LED matrices (e.g. 3 × 64×32), [install the rgbmatrix Python module](https://github.com/hzeller/rpi-rgb-led-matrix/tree/master/bindings/python), then:

```
pip install departure-server-led-matrix
```



### Usage

Use the `departure-server` command to start a board server with a specific back end. Running it without arguments lists the available back ends:

```
departure-server
```

Once started, set `DEPARTURE_BOARD_SERVER` to the board server's hostname or IP address on the client side, then start the departure client.



### About

Written by [Sébastien Pujadas](https://pujadas.net/), released under the [MIT license](https://github.com/spujadas/departure-python/blob/master/LICENSE).
