Skip to main content

Libraty providing a buffer interface to your Raspberry Pi's GPU layer. Usable with pygame, PIL and other graphics libraries.

Project description

DispmanX Bindings for Python

Documentation | Python Package Index

Usage

Install with pip,

pip install dispmanx

Then try out this sample program using pygame,

from random import randint
import pygame
from dispmanx import DispmanX

def 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.

License

This project is licensed under the MIT License — see the LICENSE file for details.

Final Note

...and remember kids, have fun!

Project details


Download files

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

Source Distribution

dispmanx-0.0.3.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

dispmanx-0.0.3-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file dispmanx-0.0.3.tar.gz.

File metadata

  • Download URL: dispmanx-0.0.3.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.9.13 Linux/5.15.0-1014-azure

File hashes

Hashes for dispmanx-0.0.3.tar.gz
Algorithm Hash digest
SHA256 34597afc0738d3d4667b418b5fa4f05fcf04f8fddb12ef14addae9c5946298f3
MD5 86802a8c1d3556989f992147086e9081
BLAKE2b-256 265ef935b499986663cee95a937abce505af6f17108c543327890441d9361370

See more details on using hashes here.

File details

Details for the file dispmanx-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: dispmanx-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.9.13 Linux/5.15.0-1014-azure

File hashes

Hashes for dispmanx-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3a18f3332c17565ca1d6a7daacf6052817c9ec6b6f4e76f1e3784e87527db5b1
MD5 52e98fe276ad9fb020ad95cc592dab87
BLAKE2b-256 13ee1b5f46cab3545c41e6fec2d71946a64d53b270e3684167d8ebd5e4053eae

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page