Metadata-Version: 2.1
Name: actfw-raspberrypi
Version: 3.3.2
Summary: actfw's additional components for RaspberryPi
Home-page: https://github.com/Idein/actfw-raspberrypi
License: MIT
Keywords: actcast
Author: Idein Inc.
Requires-Python: >=3.7,<4.0
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Dist: actfw-core (>=2.2.0)
Project-URL: Changelog, https://github.com/Idein/actfw-raspberrypi/blob/master/CHANGELOG.md
Project-URL: Documentation, https://idein.github.io/actfw-raspberrypi/latest/
Project-URL: Repository, https://github.com/Idein/actfw-raspberrypi
Description-Content-Type: text/markdown

# actfw-raspberrypi

actfw's components for Raspberry Pi.
actfw is a framework for Actcast Application written in Python.

## Installation

```console
sudo apt-get update
sudo apt-get install -y python3-pip python3-pil 
pip3 install actfw-raspberrypi
```

## Document

* [API References](https://idein.github.io/actfw-raspberrypi/latest/)

## Usage

See [actfw-core](https://github.com/Idein/actfw-core) for basic usage.

actfw-raspberrypi provides:

* `actfw_raspberrypi.capture.PiCameraCapture` : Generate CSI camera capture image
* `actfw_raspberrypi.Display` : Display using PiCamera Overlay
* `actfw_raspberrypi.vc4.Display` : Display using VideoCore IV
* `actfw_raspberrypi.vc4.Window` : Double buffered window

## Example

* `example/hello` : The most simple application example
  * Use HDMI display as 640x480 area
  * Capture 320x240 RGB image from CSI camera
  * Draw "Hello, Actcast!" text
  * Display it as 640x480 image (with x2 scaling)
  * Notice message for each frame
  * Support application setting
  * Support application heartbeat
  * Support "Take Photo" command
  * Depends: python3-picamera fonts-dejavu-core
* `example/grayscale` : Next level application example
  * Use HDMI display as 640x480 area
  * Capture 320x240 RGB image from CSI camera
  * Convert it to grayscale
  * Display it as 640x480 image (with x2 scaling)
  * Notice message for each frame
  * Support application setting
  * Support application heartbeat
  * Support "Take Photo" command
  * Depends: python3-picamera
* `example/parallel_grayscale` : Paralell processing application example
  * Use HDMI display as 640x480 area
  * Capture 320x240 RGB image from CSI camera
  * Convert it to grayscale
    * There exists 2 converter task
    * Round-robin task scheduling
  * Display it as 640x480 image (with x2 scaling)
  * Notice message for each frame
    * Show which converter processes image
  * Support application setting
  * Support application heartbeat
  * Support "Take Photo" command
  * Depends: python3-picamera
* `example/uvccamera` : UVC camera capture example
  * `picamera` is unnecessary
  * Use HDMI display center 640x480 area
  * Capture 320x240 RGB image from UVC camera
  * Convert it to grayscale
  * Display it as 640x480 image (with x2 scaling)
  * Notice grayscale pixel data histogram
  * Support application setting
  * Support application heartbeat
  * Support "Take Photo" command
  * Depends: libv4l-0 libv4lconvert0

## Development Guide

### Installation of dev requirements

Update the operating system CA store before installing development tools. Use uv 0.13.6 or later and certifi 2026.10.19 or later in existing virtual environments as well. CI checks the OS store, the project certifi bundle and, if pip is installed, pip's vendored certifi using public certificates.

`poetry.toml` keeps pip out of the project virtual environment, because the pip seeded by Poetry 1.8 vendors an older CA bundle. If an existing environment still has pip, recreate it with `poetry env remove --all` and `poetry install`.

```console
curl -LsSf https://astral.sh/uv/0.13.6/install.sh | sh
uv tool install --with 'certifi>=2026.10.19' poetry==1.8.5
poetry install
```

### Running tests

```console
poetry run nose2 -v
```

### Running examples

On a Raspberry Pi connected to HDMI display:

```console
poetry run python example/hello
```

### Releasing package & API doc

CI will automatically do.
Follow the following branch/tag rules.

1. Make changes for next version in `master` branch (via pull-requests).
2. Make a PR that updates version in `pyproject.toml` and merge it to `master` branch.
3. Create GitHub release from `master` branch's HEAD.
    1. [Draft a new release](https://github.com/Idein/actfw-raspberrypi/releases/new).
    2. Create new tag named `release-<New version>` (e.g. `release-1.4.0`) from `Choose a tag` pull down menu.
    3. Write title and description.
    4. Publish release.
4. Then CI will build/upload package to PyPI & API doc to GitHub Pages.

