Skip to main content

A python library for generating human machine interfaces

Project description

travis docs pypi

Purpose

hmPy is a Python library for building HMIs.

Installing hmPy

To install the latest version of hmPy using pip:

$ pip install hmPy

Running Tests

hmPy’s test suite can be run using tox:

$ tox

Note that pep8 compliance is required for the tests to pass.

Example Code

For those of you who want to hit the ground running:

from hmpy import Interface
from hmpy.views import ButtonView, LCDView

# Create the base interface
hmi = Interface()

# Initialize counter to 0
count = 0

# Initialize an LCD View and a button View
lcd = LCDView()
btn = ButtonView("Increment")

def increment_count():
    lcd.value += 1

# Call the increment count method whenever the button is pressed
btn.on_press(increment_count)

# Add the views to the interface
hmi.add_view(lcd)
hmi.add_view(btn)

# Launch the interface
hmi.start()

For more detailed documentation and advanced examples, see the full documentation.

Documentation

Full documentation and tutorial available at Read the Docs.

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

hmPy-0.2.0.tar.gz (12.0 kB view details)

Uploaded Source

File details

Details for the file hmPy-0.2.0.tar.gz.

File metadata

  • Download URL: hmPy-0.2.0.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for hmPy-0.2.0.tar.gz
Algorithm Hash digest
SHA256 bebf4a5ba8d8d046998f24af213bcddb0d4de1d5f015c4aedae590f5d8aaf36d
MD5 c1d25f3ed73a93bc5344f53ea4c9e3bf
BLAKE2b-256 74a3db2fd0b0fdae52c9c953f428637459e66ac60b990004568e1d93c1412116

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