Using PyTransitions with IFlowly
PyTransitions is an object oriented python library that orchestrate states and is a lightweight state machine. It is very powerful and used in production by the community. The caveat with using it right now is that the states and triggers have to be hardcoded into your site. Meaning that any time you want to add/remove states or triggers, you'll need to update your codebase unless you're using some storage format for your states and triggers.
In this tutorial we'll walk through how to create a Flat flow in IFlowly and use IFlowly Python SDK to get your states and triggers then instantiate a StateMachine with PyTransitions
Since we want to look at a flat flow, we don't need to create a steps for that flow, we just want to configure the states and triggers from the UI. Then use PyTransitions and IFlowly SDK to do the rest.
Pre-requisites:
After the setup above, we just need to create a new flow in your workspace and let's use the pre-existing states and triggers.

In your code editor, copy the snippet below into a python session or into your code.
You're all set 🚀 🎉
IFlowly is a simple storage hub for our states and triggers, with some extra capabilities that could be done from the UI. Hope you've enjoyed this article, take a look at how to build a simple approval workflow with IFlowly