actfw-core
Core components of actfw, a framework for Actcast Application written in Python. actfw-core is intended to be independent of any specific device.
Installation
sudo apt-get update
sudo apt-get install -y python3-pip python3-pil
sudo apt-get install -y libv4l-0 libv4lconvert0 # if using `V4LCameraCapture`
pip3 install actfw-core
Document
Usage
Construct your application with a task parallel model
- Application
actfw_core.Application: Main application
- Workers
actfw_core.task.Producer: Task generatoractfw_core.capture.V4LCameraCapture: Generate UVC camera capture image
actfw_core.task.Pipe: Task to Task converteractfw_core.task.Consumer: Task terminator
Each worker is executed in parallel.
User should
- Define subclass of
Producer/Pipe/Consumer
class MyPipe(actfw_core.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_core.Application()
app.register_task(p)
app.register_task(f1)
app.register_task(f2)
app.register_task(c)
- Execute application
app.run()
Development Guide
Installation of dev requirements
curl -LsSf https://astral.sh/uv/install.sh | sh
uv sync --python python3.11
Running tests
make test
Running lint
make lint
make fix
Releasing package & API doc
CI will automatically do. Follow the following branch/tag rules.
- Make changes for next version in
masterbranch (via pull-requests). - Make a PR that updates version in
pyproject.tomland merge it tomasterbranch. - Create GitHub release from
masterbranch's HEAD.- Draft a new release.
- Create new tag named
release-<New version>(e.g.release-1.4.0) fromChoose a tagpull down menu. - Write title and description.
- Publish release.
- Then CI will build/upload package to PyPI & API doc to GitHub Pages.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
actfw_core-2.20.0.tar.gz
(127.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file actfw_core-2.20.0.tar.gz.
File metadata
- Download URL: actfw_core-2.20.0.tar.gz
- Upload date:
- Size: 127.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0111b12b981ecaa721bd4aabf5c3b7b1e596fbac2963a7c4193c07794f949173
|
|
| MD5 |
4fed08b19746a08100bbe5028be965f3
|
|
| BLAKE2b-256 |
90129c1c5b2d4a6cefe5562104a6b121b81519661edbf48eda5fad61532c6273
|
File details
Details for the file actfw_core-2.20.0-py3-none-any.whl.
File metadata
- Download URL: actfw_core-2.20.0-py3-none-any.whl
- Upload date:
- Size: 84.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
acde4629a21b0a410459afb3190e23f9076f2b8c7cde1732361aeb30956de5ff
|
|
| MD5 |
779463dae6ec0889d780df4a4a1d73b3
|
|
| BLAKE2b-256 |
ca5c0fa7a8042a3eb35c097e34cc8c0a94521752a1df1394ab22a13838202abc
|