Skip to main content

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.0.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

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

formpix-1.0.0-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file formpix-1.0.0.tar.gz.

File metadata

  • Download URL: formpix-1.0.0.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for formpix-1.0.0.tar.gz
Algorithm Hash digest
SHA256 ed46e3c288c6e2595328814aacd8b1b147f6aa9a1c4b7efd34ad122d905a0bfb
MD5 46c99dced58e812d49dbac92856f62d4
BLAKE2b-256 60aa1a55292933798d578fe8dda0d075a6924c9ff3a0a9e91b47dec6e84a0fc8

See more details on using hashes here.

File details

Details for the file formpix-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: formpix-1.0.0-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

Hashes for formpix-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bd855ee245b77c9391f57623598fe9f1dd67fa5344c1e28238a1ca90315e9e6c
MD5 4a8e81af1b64ac909962d0073f799627
BLAKE2b-256 da48d4ef700ec2f69645de62650efce8dd29613bf564eb2254400a2617a5a842

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