Command and Real-time Acquisition in Parallelized PYthon (CRAPPY)
Crappy is an open-source Python framework for command and data acquisition on experimental setups. A Crappy test is a Python script assembled from Blocks that acquire measurements, drive actuators, process data, display signals, or save results. Links carry labeled data between these Blocks.
Crappy is developed at LaMCube, a mechanical research laboratory in Lille, France, where it is used mainly for materials testing.
Why use Crappy?
As experimental setups grow, coordinating instruments from different vendors, organizing acquisition and commands, and reproducing the same test procedure can become increasingly difficult. Commercial packages may tie a setup to a specific ecosystem, while writing a complete control application from scratch requires time and software expertise.
Crappy provides a common, modular framework for these tasks. Ready-to-use Blocks can be combined and replaced as an experiment evolves, and users can use included hardware drivers or integrate custom devices. Because each test is an ordinary Python script, its complete workflow can be saved, shared, and repeated. Crappy is also designed to use computer resources efficiently, helping beginners and experts build responsive experiments without having to write the underlying software.
What can Crappy do?
- Acquire measurements from sensors and laboratory instruments
- Drive actuators and build feedback loops
- Capture, process, display, and record images
- Display and save experimental data as it is acquired
- Integrate custom hardware and processing code for user-specific needs
- Run on Linux, Windows, macOS, and Raspberry Pi
Installation
Crappy requires Python 3.10 or newer and NumPy 2.0 or newer. Install it from PyPI with:
python -m pip install crappy
The default graphical interfaces in Crappy use PyQt6 and PyQtGraph. Install these GUI dependencies with:
python -m pip install PyQt6 pyqtgraph
See the installation guide for platform-specific instructions and optional dependencies.
Example script
This example reads the computer's memory usage, displays it live, records it in
data.csv, and stops automatically after ten seconds. It requires no physical
hardware, but uses PyQtGraph and PyQt6 for the graph and psutil for the
simulated input:
python -m pip install pyqtgraph PyQt6 psutil
import crappy
if __name__ == '__main__':
acquisition = crappy.blocks.IOBlock('FakeInOut', labels=('t(s)', 'ram(%)'))
graph = crappy.blocks.Grapher(('t(s)', 'ram(%)'))
recorder = crappy.blocks.Recorder('data.csv', labels=('t(s)', 'ram(%)'))
stop = crappy.blocks.StopBlock('t(s) > 10')
crappy.link(acquisition, graph)
crappy.link(acquisition, recorder)
crappy.link(acquisition, stop)
crappy.start()
Refer to the documentation for a detailed explanation of each Block's purpose and capability.
Documentation and support
Start with Is Crappy right for you? for a broader overview of the framework, its intended uses, and its limits.
- The tutorials provide guided introductions to common tasks and custom objects
- The examples provide complete scripts organized by task, with and without physical hardware
- The core concepts explain how Blocks, Links, labels, and test lifecycles fit together
- The hardware matrix lists the available drivers and their known platform and backend support
- The API reference documents the arguments and methods of Crappy's public objects
If something does not work as expected, consult the troubleshooting guide first. The support and reporting guide then explains where and how to ask a question, report a bug, or share hardware compatibility results.
Usage questions are welcome in GitHub Discussions. Use the issue tracker for reproducible bugs and hardware compatibility reports.
Citing Crappy
If Crappy contributes to published research, please cite:
Couty V., Witz J.-F., Martel C. et al. Command and Real-Time Acquisition in Parallelized Python, a Python module for experimental setups. SoftwareX 16, 2021. doi:10.1016/j.softx.2021.100848
See the citation guidance
and CITATION.cff
for structured metadata.
License
Crappy is distributed under the GNU General Public License v2.0 or later.
Copyright © 2015–present, Laboratoire Mécanique de Lille and contributors.
Metadata
Release files for crappy 2.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| crappy-2.1.0.tar.gz | 780.7 kB | Without provenance | Details for crappy-2.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| crappy-2.1.0-py3-none-any.whl | Python 3 | none | any | Details for crappy-2.1.0-py3-none-any.whl |
Total release size: 1.7 MB
Release files / crappy-2.1.0.tar.gz
| Download URL | crappy-2.1.0.tar.gz |
|---|---|
| Size | 780.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
21ea001714dc793ef2351ebd5ffcf493c7feb0b3b22a48c0b8aa5d1b79f034b0
|
|
BLAKE2b-256 checksum How to use checksums |
9cd93bec52fb333abff4e39b63b5a73ea18f8728fb17c3208ff021a9f75471e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.8
|
Release files / crappy-2.1.0-py3-none-any.whl
| Download URL | crappy-2.1.0-py3-none-any.whl |
|---|---|
| Size | 929.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b28ad0fe5ed9b119343ddcef2f0d2fb2d7d9fddda65c9d28dfc674692185b472
|
|
BLAKE2b-256 checksum How to use checksums |
85b88c806896894c840cdb2360ac261b7126c570029844b5f53b5d63a37cfee6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.8
|
Security for crappy 2.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.