Skip to content

Commit

Permalink
switch badge and minor changes to key concepts
Browse files Browse the repository at this point in the history
  • Loading branch information
aleneum committed May 3, 2024
1 parent 890e815 commit 29181c2
Showing 1 changed file with 41 additions and 36 deletions.
77 changes: 41 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Version](https://img.shields.io/badge/version-v0.9.1-orange.svg)](https://github.com/pytransitions/transitions)
[![Build Status](https://github.com/pytransitions/transitions/actions/workflows/pytest.yml/badge.svg)](https://github.com/pytransitions/transitions/actions?query=workflow%3Apytest)
[![Coverage Status](https://codecov.io/gh/pytransitions/transitions/branch/master/graphs/badge.svg)](https://app.codecov.io/gh/pytransitions/transitions/tree/master)
[![Coverage Status](https://coveralls.io/repos/github/pytransitions/transitions/badge.svg?branch=master)](https://coveralls.io/github/pytransitions/transitions?branch=master)
[![PyPi](https://img.shields.io/pypi/v/transitions.svg)](https://pypi.org/project/transitions)
[![Copr](https://img.shields.io/badge/dynamic/json?color=blue&label=copr&query=builds.latest.source_package.version&url=https%3A%2F%2Fcopr.fedorainfracloud.org%2Fapi_3%2Fpackage%3Fownername%3Daleneum%26projectname%3Dpython3-transitions%26packagename%3Dpython3-transitions%26with_latest_build%3DTrue)](https://copr.fedorainfracloud.org/coprs/aleneum/python3-transitions/package/python3-transitions)
[![GitHub commits](https://img.shields.io/github/commits-since/pytransitions/transitions/0.9.0.svg)](https://github.com/pytransitions/transitions/compare/0.9.0...master)
Expand All @@ -24,39 +24,44 @@ A lightweight, object-oriented state machine implementation in Python with many

## Table of Contents

- [Quickstart](#quickstart)
- [Non-Quickstart](#the-non-quickstart)
- [Some key concepts](#key-concepts)
- [Basic initialization](#basic-initialization)
- [States](#states)
- [Callbacks](#state-callbacks)
- [Checking state](#checking-state)
- [Enumerations](#enum-state)
- [Transitions](#transitions)
- [Triggering a transition](#triggers)
- [Automatic transitions](#automatic-transitions-for-all-states)
- [Transitioning from multiple states](#transitioning-from-multiple-states)
- [Reflexive transitions from multiple states](#reflexive-from-multiple-states)
- [Internal transitions](#internal-transitions)
- [Ordered transitions](#ordered-transitions)
- [Queued transitions](#queued-transitions)
- [Conditional transitions](#conditional-transitions)
- [Check transitions](#check-transitions)
- [Callbacks](#transition-callbacks)
- [Callable resolution](#resolution)
- [Callback execution order](#execution-order)
- [Passing data](#passing-data)
- [Alternative initialization patterns](#alternative-initialization-patterns)
- [Logging](#logging)
- [(Re-)Storing machine instances](#restoring)
- [Extensions](#extensions)
- [Diagrams](#diagrams)
- [Hierarchical State Machine](#hsm)
- [Threading](#threading)
- [Async](#async)
- [State features](#state-features)
- [Django](#django-support)
- [Bug reports etc.](#bug-reports)
- [ transitions](#-transitions)
- [Installation](#installation)
- [Table of Contents](#table-of-contents)
- [Quickstart](#quickstart)
- [The non-quickstart](#the-non-quickstart)
- [Some key concepts](#some-key-concepts)
- [Basic initialization](#basic-initialization)
- [States](#states)
- [Callbacks](#callbacks)
- [Checking state](#checking-state)
- [Enumerations](#enumerations)
- [Transitions](#transitions)
- [Triggering a transition](#triggering-a-transition)
- [Triggering invalid transitions](#triggering-invalid-transitions)
- [Automatic transitions for all states](#automatic-transitions-for-all-states)
- [Transitioning from multiple states](#transitioning-from-multiple-states)
- [Reflexive transitions from multiple states](#reflexive-transitions-from-multiple-states)
- [Internal transitions](#internal-transitions)
- [ Ordered transitions](#-ordered-transitions)
- [Queued transitions](#queued-transitions)
- [Conditional transitions](#conditional-transitions)
- [Check transitions](#check-transitions)
- [Callbacks](#callbacks-1)
- [Callable resolution](#callable-resolution)
- [Callback execution order](#callback-execution-order)
- [Passing data](#passing-data)
- [Alternative initialization patterns](#alternative-initialization-patterns)
- [Logging](#logging)
- [(Re-)Storing machine instances](#re-storing-machine-instances)
- [ Extensions](#-extensions)
- [ Diagrams](#-diagrams)
- [Hierarchical State Machine (HSM)](#hierarchical-state-machine-hsm)
- [Reuse of previously created HSMs](#reuse-of-previously-created-hsms)
- [ Threadsafe(-ish) State Machine](#-threadsafe-ish-state-machine)
- [ Using async callbacks](#-using-async-callbacks)
- [Adding features to states](#adding-features-to-states)
- [ Using transitions together with Django](#-using-transitions-together-with-django)
- [I have a \[bug report/issue/question\]...](#i-have-a-bug-reportissuequestion)

## Quickstart

Expand Down Expand Up @@ -186,15 +191,15 @@ Have a look at the [Diagrams](#diagrams) extensions if you want to know how.

## The non-quickstart

A state machine is a _model_ of behavior composed of a finite number of _states_ and _transitions_ between those states. Within each state and transition some _action_ can be performed. A state machine needs to start at some _initial state_.
A state machine is a _model_ of behavior composed of a finite number of _states_ and _transitions_ between those states. Within each state and transition some _action_ can be performed. A state machine needs to start at some _initial state_. When using `transitions`, a state machine may consist of multiple objects where some (_machines_) contain definitions for the manipulation of other (_models_). Below, we will look at some core concepts and how to work with them.

### Some key concepts

- **State**. A state represents a particular condition or stage in the state machine. It's a distinct mode of behavior or phase in a process.

- **Transition**. This is the process or event that causes the state machine to change from one state to another.

- **Model**. Blueprint or structure that holds the state machine. It's the entity that gets updated as new states and transitions are added.
- **Model**. The actual stateful structure. It's the entity that gets updated during transitions. It may also define _actions_ that will be executed during transitions. For instance, right before a transition or when a state is entered or exited.

- **Machine**. This is the entity that manages and controls the model, states, transitions, and actions. It's the conductor that orchestrates the entire process of the state machine.

Expand Down

0 comments on commit 29181c2

Please sign in to comment.