6.1. raspi_server package

6.1.1. Submodules

6.1.2. raspi_server.raspi_camera module

raspi_camera.py: Provide a PEPI-compatible Camera backed by a connected Raspberry Pi Camera Module.

class raspi_server.raspi_camera.RaspPiCamera(resolution=(2592, 1944))[source]

Bases: server.abstract_camera.AbstractCamera

RaspPiCamera is a concrete AbstractCamera that uses the Raspberry Pi Camera Module v1/v2 to obtain imagery. It is capable of taking pictures in various resolutions, but defaults to the maximum resolution of 2592x1944. It essentially serves as a convenient wrapper around PiCamera, but in the PEPI format.

MAX_RESOLUTION = (2592, 1944)
SUPPORTS_STREAMING = True
get_current_resolution()[source]

Gets the resolution of this PiCamera

get_max_resolution()[source]

Gets the maximum supported resolution of this PiCamera

low_res_still()[source]

Captures a 640x480 still from PiCamera natively.

set_resolution(x, y)[source]

Sets the resolution of this camera for all future captures from it, if the provided resolution is valid.

Parameters:
  • x – the x-dimension of the desired resolution
  • y – the y-dimension of the desired resolution
still()[source]

Captures a still from PiCamera with its current setup.

6.1.3. raspi_server.raspi_server module

class raspi_server.raspi_server.RaspPiCameraServer(cameras, stream=True)[source]

Bases: server.base_camera_server.BaseCameraServer

An implementation of a BaseCameraServer for a Raspberry Pi.

6.1.4. raspi_server.run module

Launcher for the Raspberry Pi server and camera implementations.

6.1.5. Module contents