Skip to main content

Actcast Application Framework

Project description

Actcast Application Framework for Python

This package provides a Python API for developing Actcast apps.

Installation

for Raspberry Pi

sudo apt-get update
sudo apt-get install -y python3-pil python3-setuptools python3-wheel picamera
pip3 install .

Usage

Construct your application with a task parallel model

  • Application
    • actfw.Application : Main application
  • Workers
    • actfw.task.Producer : Task generator
      • actfw.PiCameraCapture : Task generator which generate capture image as task
    • actfw.task.Pipe : Task to Task converter
    • actfw.task.Consumer : Task terminator

Each worker is executed in parallel.

User should

  • Define subclass of Producer/Pipe/Consumer
class MyPipe(actfw.task.Pipe):
    def proc(self, i):
        ...
  • Connect defined worker objects
p  = MyProducer()
f1 = MyPipe()
f2 = MyPipe()
c  = MyConsumer()
p.connect(f1)
f1.connect(f2)
f2.connect(c)
  • Register to Application
app = actfw.Application()
app.register_task(p)
app.register_task(f1)
app.register_task(f2)
app.register_task(c)
  • Execute application
app.run()

Please, see and try examples.

Example

  • example/hello : The most simple application example
    • Use HDMI display as 640x480 area
    • Capture 320x240 RGB image
    • 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
  • example/grayscale : Next level application example
    • Use HDMI display as 640x480 area
    • Capture 320x240 RGB image
    • 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
  • example/parallel_grayscale : Paralell processing application example
    • Use HDMI display as 640x480 area
    • Capture 320x240 RGB image
    • 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

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

actfw-1.0.1-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file actfw-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: actfw-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8

File hashes

Hashes for actfw-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f424d5190ad92a63e13e9d7c1771e0762773e096fb879fd94088ee42b28c7308
MD5 921813a9bfe5aa519e17fcea4353c9be
BLAKE2b-256 a38c9d212a0f47d6d180a995d31049e29a3e2538a3ec08b4b94b69549ed9f99b

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