Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dtcooper/python-dispmanx
Python Wrapper for the Raspberry Pi's Dispmanx API
https://github.com/dtcooper/python-dispmanx
ctypes dispmanx numpy pillow pycairo pygame python raspberry-pi
Last synced: 16 days ago
JSON representation
Python Wrapper for the Raspberry Pi's Dispmanx API
- Host: GitHub
- URL: https://github.com/dtcooper/python-dispmanx
- Owner: dtcooper
- License: mit
- Created: 2022-08-01T08:52:38.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-20T19:53:17.000Z (11 months ago)
- Last Synced: 2024-09-18T00:09:33.191Z (about 2 months ago)
- Topics: ctypes, dispmanx, numpy, pillow, pycairo, pygame, python, raspberry-pi
- Language: Python
- Homepage: https://dtcooper.github.io/python-dispmanx/
- Size: 659 KB
- Stars: 5
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
DispmanX Bindings for Python
Documentation |
Python Package Index## Usage
Install with pip,
```bash
pip install dispmanx
```Then try out this sample program using [pygame](https://www.pygame.org/docs/),
```python
from random import randint
import pygame
from dispmanx import DispmanXdef random_color_with_alpha():
return tuple(randint(0, 0xFF) for _ in range(3)) + (randint(0x44, 0xFF),)display = DispmanX(pixel_format="RGBA")
surface = pygame.image.frombuffer(display.buffer, display.size, display.pixel_format)
clock = pygame.time.Clock()for _ in range(20):
surface.fill(random_color_with_alpha())
display.update()
clock.tick(2)```
Next stop: [the project's documentation](https://dtcooper.github.io/python-dispmanx/).
## License
This project is licensed under the [MIT License](https://opensource.org/licenses/MIT)
— see the [LICENSE](https://github.com/dtcooper/python-dispmanx/blob/main/LICENSE)
file for details.## Final Note
**_...and remember kids, have fun!_**