Skip to main content

SDL2 Departure board back end

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

departure-server-sdl-1.0.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

departure_server_sdl-1.0.0-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file departure-server-sdl-1.0.0.tar.gz.

File metadata

  • Download URL: departure-server-sdl-1.0.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for departure-server-sdl-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f21faeddb01d19aee0d44f3704de6ec03709e727736d8ddc542964355f6dd6f2
MD5 ed44f8b45da86a8b3a1cd5fd0667e713
BLAKE2b-256 d1d147e86e817b287d00399fd8842a864253fe6a766547230cc40522d9fbe2a3

See more details on using hashes here.

File details

Details for the file departure_server_sdl-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: departure_server_sdl-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for departure_server_sdl-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a6390fcc1b063823f07e2c203a9c573cf7f7755c3a4dc8ff5516f421efdaa2da
MD5 e38052598b2da23dbdac5cdb5240fab8
BLAKE2b-256 0848a489640c740c594804ac027b8f8c8903385fdfffd4632bf9b0c0c274ebe8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page