Skip to main content

General purpose Python automatization library with nifty real-time web UI

Project description

Travis CI Status Coverage Status Documentation Status https://img.shields.io/pypi/v/automate.svg https://img.shields.io/pypi/pyversions/automate.svg https://img.shields.io/badge/licence-GPL-blue.svg

Automate

Automate is a general purpose automatization library for Python. Its objective is to offer convenient and robust object-oriented programming framework for complex state machine systems. Automate can be used to design complex automation systems, yet it is easy to learn and fun to use. It was originally developed with home robotics/automatization projects in mind, but is quite general in nature and one could find applications from various fields that could take advantage of Automate. Automate can be embedded in other Python software as a component, which runs its operations in its own threads.

Highlights:

  • Supported hardware:

    • Raspberry Pi GPIO input/output ports

    • Arduino analog and digital input/output ports (via pyFirmata library)

    • Easy to write extensions to support other hardware

  • System state saving and restoring via serialization

  • Intelligent design:

    • Comprehensively tested via py.test unit/integration tests

    • Takes advantage of Traits library, especially its notification system.

    • IPython console to monitor, modify and control system on-the-fly

    • Versatile function/callable library to write state program logic

  • RPC and Websocket interfaces to connect between other applications or other Automate systems.

  • Comprehensive and customizable Web User Interface

  • UML graphs can be drawn automaticlaly of the system (as can be seen in the examples of this documentation)

Example

Let’s take a look at a small Automate program as an example:

from automate import *

class MySystem(System):
    # HW swtich connected Raspberry Pi GPIO port 1
    hardware_switch = RpioSensor(port=1)
    # Switch that is controllable, for example, from WEB interface
    web_switch = UserBoolSensor()
    # Lamp relay that switches lamp on/off, connected to GPIO port 2
    lamp = RpioActuator(port=2)
    # Program that controls the system behaviour
    program = Program(
        active_condition=Or('web_switch', 'hardware_switch'),
        on_activate=SetStatus('lamp', True)
    )


my_system = MySystem()

This simple example has two sensors hardware_switch, web_switch, actuator (lamp) and a program that contains logic what to do and when. Here, lamp is switched on if either web_switch or hardware_switch has status True.

Installing Automate

Automate can be installed like ordinary python package. I recommend installation in within virtual environment (see virtualenv).

  1. (optional): Create and start using virtualenv:

    mkvirtualenv automate
    workon automate
  2. Install from pypi:

    pip install automate

Optionally, you can specify some of the extras, i.e. web, rpc, raspberrypi, arduino:

pip install automate[web,rpc,raspberrypi,arduino]

or if you want them all:

pip install automate[all]

Licence

Automate is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Automate is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Automate. If not, see http://www.gnu.org/licenses/.

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

automate-0.10.8.tar.gz (351.9 kB view details)

Uploaded Source

Built Distribution

automate-0.10.8-py3-none-any.whl (369.8 kB view details)

Uploaded Python 3

File details

Details for the file automate-0.10.8.tar.gz.

File metadata

  • Download URL: automate-0.10.8.tar.gz
  • Upload date:
  • Size: 351.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for automate-0.10.8.tar.gz
Algorithm Hash digest
SHA256 706da60b778d66d012b7670b937aa3d7a6d0537f9bf404bd9a2f185174758a29
MD5 f9dfc0e5bc68a67b6d92ba5c5f4c8659
BLAKE2b-256 f14dda771d089958d1de75eea629057eec579c590bcbac966d19708d033116fd

See more details on using hashes here.

File details

Details for the file automate-0.10.8-py3-none-any.whl.

File metadata

File hashes

Hashes for automate-0.10.8-py3-none-any.whl
Algorithm Hash digest
SHA256 65b4e258836ea58dbd6b5642db57c2e22ec29b5d6dc3a4f805c4da95c45ff029
MD5 a3b7e071afd1cfe9cf7ec4965ba98ac2
BLAKE2b-256 2af269f70d337038995f68362eb97fc19eead10f6f1f01a4eb0596e7011c30e7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page