Skip to main content

Departure board servers (Python)

This repository contains the source code for the Python Departure board servers, which can be plugged into the Python Departure module.

It contains the following board server back ends:

  • Pygame,
  • SDL2,
  • LED matrix, for physical departure boards powered by Raspberry Pi and the Python bindings of the rpi-rgb-led-matrix project.

Installation

On Debian-based Linux (and similarly for other flavours of Linux), for the Pygame back end, make sure the following packages are installed:

$ 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

The SDL2 back end is built on PySDL2: see https://pysdl2.readthedocs.io/en/latest/install.html#prerequisites its prerequisites.

Note – For this back end, before starting the server, make sure that the PYSDL2_DLL_PATH environment directory points to the SDL2 library (e.g. SDL2.dll on Windows) if it's not in the standard library directories.

The Pygame and SDL2 back ends can be installed using:

$ pip install departure-server-pygame
$ pip install departure-server-sdl

These commands will install the prerequired Python packages.

To use the LED matrix back end on a Raspberry Pi with suitable LED matrices (e.g. 3 64x32 matrices), first install the rgbmatrix module as per the instructions, then run:

$ pip install departure-server-led-matrix

Usage

Use the departure-server command to start a board server with a specific back end.

Running the command without an argument will show the available back ends.

$ departure-server

departure-server CLI

Once the board server has been started, on the client side (e.g. using the departure CLI or the Departure web API server), set the DEPARTURE_BOARD_SERVER environment variable to the IP address or hostname of the server, then start the client.

Here is an image of the board server running the Pygame back end:

Pygame virtual departure board - SNCF (FR) - Paris Montparnasse

About

Written by Sébastien Pujadas, released under the MIT license.

Metadata

Release files for departure-server-pygame 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for departure-server-pygame 1.0.0
File Size Uploaded
departure-server-pygame-1.0.0.tar.gz 3.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for departure-server-pygame 1.0.0
File Interpreter ABI Platform
departure_server_pygame-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.4 kB

Release files / departure-server-pygame-1.0.0.tar.gz

Download URL departure-server-pygame-1.0.0.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
03149495e9b0e8800c03e46462a2865c91e4d358a40b0db134086b9801714fef
BLAKE2b-256 checksum
How to use checksums
e63ace730f5b67ebc6f89bca6cd12c4d456249e22a03386e450683a0f2e4aef2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.6.4

Release files / departure_server_pygame-1.0.0-py3-none-any.whl

Download URL departure_server_pygame-1.0.0-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7b9fc5ca2afda4dbf7ecd7897135339ffc73812a329bf2483ce812db5674a90d
BLAKE2b-256 checksum
How to use checksums
a80322936fc86c0ad6164566795a8996f0b41cd34b263a3fe881038bc1d05f2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.6.4

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page