Skip to main content
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 support for analog and digital input/output ports and VirtualWire wireless networking with AutomateFirmata.

    • 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]

License

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/.

Release files for automate 0.10.19

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for automate 0.10.19
File Size Uploaded
automate-0.10.19.tar.gz 359.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for automate 0.10.19
File Interpreter ABI Platform
automate-0.10.19-py3-none-any.whl Python 3 none any Details

Total release size: 735.7 kB

Release files / automate-0.10.19.tar.gz

Download URL automate-0.10.19.tar.gz
Size 359.7 kB
Tags Source
SHA-256 checksum
How to use checksums
624c7ee69ccf66423967e50aa8b44e06892370fc6fde84d9a546b1e84eccc4f9
BLAKE2b-256 checksum
How to use checksums
ec767423e6f151a09193537fb2b3d069d2e14ac4588f4eea4ccf8cfd09b75c9a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / automate-0.10.19-py3-none-any.whl

Download URL automate-0.10.19-py3-none-any.whl
Size 376.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
338fa6a3d0ea79c1137d0311b73a56577613b0b3d997823e0161563f8309ee81
BLAKE2b-256 checksum
How to use checksums
eed37afeb7f2cfb9c98eb495029f2bf550b0a4dcafeacee8033aed4762954475
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.10.19 This release

2 release files

0.10.9

2 release files

0.10.8

2 release files

0.10.7

2 release files

0.10.6

2 release files

0.10.5

2 release files

0.10.4

2 release files

0.10.3

2 release files

0.10.2

2 release files

0.10.1

2 release files

0.10.0

2 release files

0.9.2

1 release file

0.9.1

1 release file

0.9

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page