Automate is a general purpose Python automatization library.
Project description
Automate BETA
Read full documentation at http://python-automate.readthedocs.org/
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 operation in its own threads.
Highlights:
Supported hardware:
System state saving and restoring via serialization
Intelligent design:
RPC and Websocket interfaces (provided by automate-rpc and automate-webui) to connect between other applications or other Automate systems.
Comprehensive and customizable Web User Interface via automate-webui extension.
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, which uses also automate-rpio extension.
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).
(optional): Create and start using virtualenv:
mkvirtualenv automate workon automate
Install from pypi:
pip install automate
If you want to install some extensions too, you may also run:
pip install automate-webui pip install automate-rpc pip install automate-arduino pip install automate-rpio
Optionally, you could install also by cloning GIT repository and installing manually:
git clone https://github.com/tuomas2/automate.git cd automate ./setup.py install
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file automate-0.9.1.tar.gz
.
File metadata
- Download URL: automate-0.9.1.tar.gz
- Upload date:
- Size: 40.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76a4e154bca1550b6645909a0ace352f510497b303f006b79a203f28e3e8f084 |
|
MD5 | f959f3b27bc9cb426a18c4b990c6de08 |
|
BLAKE2b-256 | b180202c4afd2a9784ead57b2b9d0f7183a0bc27192d249968dcf034d80f8c25 |