Skip to main content

Une librairie pour aider les devs du projet pixit sur la connexion entre les jeux et la console.

Project description

PixitLib

PixitLib est une librairie Python permettant de gérer la connexion et la communication avec une matrice LED et une console de jeu.

Installation

Vous pouvez installer PixitLib directement depuis PyPI :

pip install pixitlib

Ou depuis GitHub :

pip install git+https://github.com/TonGithub/pixitlib.git

Utilisation

Importation de la librairie

from pixitlib import GameConnexion

Création d'une connexion

game = GameConnexion()
game.connect()

Envoi d'une trame à la matrice LED

Vous pouvez envoyer une trame personnalisée à la matrice LED :

frame = ";".join(["(255,0,0)"] * 128 + ["(0,0,255)"] * 128)  # Rouge et bleu
game.send_frame(frame)

Réception des commandes de la console

game.listen_commands()

Fermeture de la connexion

game.close()

Configuration

Par défaut, pixitlib utilise les valeurs suivantes :

  • Adresse IP : 127.0.0.1
  • Port Console : 58591
  • Port Matrice LED : 58600

Vous pouvez modifier ces paramètres lors de l'initialisation :

game = GameConnexion(host="192.168.1.10", console_port=12345, matrix_port=54321)

Développement

Si vous souhaitez contribuer au projet, clonez le dépôt et installez la version locale :

git clone https://github.com/TonGithub/pixitlib.git
cd pixitlib
pip install -e .

📝 Licence

Ce projet est sous licence MIT. Vous êtes libre de l'utiliser et de le modifier selon vos besoins.

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

pixitlib-0.1.5.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

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

pixitlib-0.1.5-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file pixitlib-0.1.5.tar.gz.

File metadata

  • Download URL: pixitlib-0.1.5.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.5

File hashes

Hashes for pixitlib-0.1.5.tar.gz
Algorithm Hash digest
SHA256 80e11e0b9e92c7690df148fbfed65b0242af64b953fc9b0aac2c9406b3e5b0aa
MD5 f2755e921474d087f0b4543f4e2dac86
BLAKE2b-256 94f0532787fb475493dc523291b16891b14638c401ae7f903f2cf9a8a54e9bc7

See more details on using hashes here.

File details

Details for the file pixitlib-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: pixitlib-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.5

File hashes

Hashes for pixitlib-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 8dd7d770049730595dd626d0a3caacbbac59fa3f5cfed23c8cd2330b4eacf6b5
MD5 14f0a9d85bac1490ec1c2e6a478b6b78
BLAKE2b-256 d56b36e127261f2489b33ed135de21c3568f789a442a4fbb6a72bc28ba6d8ebb

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