flowchem-virtual provides virtual devices (digital twins) for the hardware implemented in the main flowchem package.
It’s designed as a drop-in replacement for flowchem when you want to:
-
Develop and debug flows
-
Test configuration files
-
Run CI pipelines
…without having the physical hardware connected.
pip install flowchem-virtualIf you already know how flowchem works, using flowchem-virtual is straightforward.
Normally, you would start a flowchem server with:
flowchem /path/to/configuration_file.tomlTo use the virtual devices instead, simply run:
flowchem-virtual /path/to/configuration_file.tomlflowchem-virtual will:
-
Read the same configuration file
-
Expose virtual counterparts of all devices defined there
-
Keep the same API and behavior as much as possible, but without touching real hardware
This makes it a convenient simulation layer for your existing setups.
Typical scenarios:
-
💻 Local development of client code without access to the lab
-
🧪 Unit tests / CI where hardware is not available (or not desirable)
-
📦 Trying out configuration changes before deploying them to a real setup
-
📚 Teaching and demos of flowchem-based automation
If you are not yet familiar with flowchem, it’s highly recommended to learn the basics there first.
Once you understand how devices and configuration files work in flowchem, switching to the virtual version is just a matter of changing the command from:
flowchem ...to:
flowchem-virtual ...-
Virtual devices do not control real hardware (obviously 😄).
-
Most part of device-specific behavior (e.g. exact timing, error states) may be simplified.
-
If your code depends on very low-level hardware quirks, the virtual version might not reproduce them perfectly.
Pull requests, bug reports and feature requests are welcome!
This project is licensed under the MIT License – see the LICENSE file for details.