Learn more  » Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

agriconnect / trio-gpio   python

Repository URL to install this package:

Version: 0.1.1 

/ __init__.py

"""Top-level package for trio-gpio."""

import sys

from ._version import __version__  # noqa

from .gpio import Chip
from .libgpiod import *  # noqa


def open_chip(num=0, consumer=sys.argv[0]):
    """Returns an object representing a GPIO chip.

    Arguments:
        num: Chip number. Defaults to zero.

        consumer: A string for display by kernel utilities.
            Defaults to the program's name.

    Returns:
        a :class:`trio_gpio.gpio.Chip` instance.
    """
    return Chip(num, consumer=consumer)