Client library for interacting with the FormPix API
Project description
Formpix Module
For interacting with a formPix instance easily.
Install in Python project
pip install formpix
Example script
import formpix
formpix.login(
"ADDRESS OF FORMPIX INSTANCE HERE, NO '/'... ",
"GET AN API KEY FROM THE FORMBAR INSTANCE THE FORMPIX IS CONNECTED TO"
)
formpix.fill('#ff0000', 0, 10)
Methods
# Connect to formpix
formpix.login(formpixURL, formbarAPIkey)
# Fill length of bar with color
formpix.fill(color, start, length)
# Fill length of bar with two color gradient
formpix.gradient(start_color, end_color, start, length)
# Set a single pixel to a color
formpix.set_pixel(location, color)
# Set an array of pixels (as pixel objects)
# { "pixel_number": integer, "color": #hexcolor }
formpix.set_pixels(pixels)
# Display text on the board extension
formpix.say(text, color, bgcolor)
# Get a list of 'bgm' or 'sfx' on the formpix
# type is 'bgm' or 'sfx'
formpix.get_sounds(type)
# Play a bgm or sound on the formpix
# Use 'None' for the parameter you don't want to use
formpix.play_sound(sfx, bgm)
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
formpix-1.0.2.tar.gz
(2.5 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 formpix-1.0.2.tar.gz.
File metadata
- Download URL: formpix-1.0.2.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a2dd8bded882907a6e73b1b74629f6d9cb5ecda2ac5f97fee0c5b724cea2cfe
|
|
| MD5 |
2f6a587cbfe63a57d76c6451af1e62fa
|
|
| BLAKE2b-256 |
7585f185319e3547dcf6d6c4886754f035c5945cb805a1ee8ce11547370043a6
|
File details
Details for the file formpix-1.0.2-py3-none-any.whl.
File metadata
- Download URL: formpix-1.0.2-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fbc73042a0ae98b80e0f39966dd7d3afcbd494d5e76936853633090ca14b1577
|
|
| MD5 |
2b9446081d819016b9e74ad9e7c12475
|
|
| BLAKE2b-256 |
739febcf2c1df58f23f619f314849a6ab5e4bc5e24ebde8861a532adcd4cb81c
|