Skip to main content

InteractFlow

Python Version Version License: MIT PyPI Status Upload Python Package Downloads

InteractFlow is a powerful Python tool designed to record and replay user interactions with high precision. Perfect for creating automated workflows, testing scenarios, or demonstrating user interfaces, it captures every detail of user interaction including mouse movements, clicks, keyboard inputs, and scroll actions.

Features

  • 🎥 High-Precision Recording: Captures mouse movements, clicks, keyboard inputs, and scroll actions
  • ⏯️ Flexible Playback: Replay recorded actions with adjustable speed
  • 🎮 Multiple Recording Management: Save and organize multiple recordings
  • ⚡ Performance Optimized: Smart filtering of redundant mouse movements
  • 🛡️ Graceful Handling: Clean shutdown and save functionality

Quick Start

Installation

pip install interactflow

Alternative: Install from Source

  1. Clone the repository:
git clone git@github.com:yashChouriya/interactflow.git
cd interactflow
  1. Create and activate a virtual environment:
python -m venv env
source env/bin/activate  # On Windows: .\env\Scripts\activate
  1. Install in development mode:
pip install -e .

Basic Usage

Recording User Actions

Start recording your actions:

interactflow record

Press Ctrl+C to stop recording. The recording will be automatically saved in the ~/.interactflow/recordings directory.

Playing Back Recordings

Play a recorded session:

interactflow play ~/.interactflow/recordings/your_recording.json

Adjust playback speed:

interactflow play ~/.interactflow/recordings/your_recording.json --speed 2.0  # Play at 2x speed

Listing Available Recordings

View all recordings:

interactflow list

Advanced Usage

Recording Module

from interactflow.recorder import ActivityRecorder

# Initialize recorder
recorder = ActivityRecorder()

# Start recording
recorder.start_recording()

# Stop recording
recorder.stop_recording()

# Save recording
recorder.save_recording('my_recording.json')

Playback Module

from interactflow.player import ActivityPlayer

# Initialize player
player = ActivityPlayer()

# Load and play recording
player.load_recording('my_recording.json')
player.play(speed_multiplier=1.5)  # Play at 1.5x speed

Technical Details

Dependencies

  • Python 3.6+
  • pynput >= 1.7.6
  • python-xlib >= 0.33

Project Structure

interactflow/
├── src/
│   ├── __init__.py
│   ├── main.py        # CLI interface
│   ├── recorder.py    # Recording functionality
│   └── player.py      # Playback functionality
├── recordings/        # Stored recordings directory
├── .github/          # GitHub configuration
│   └── workflows/    # GitHub Actions
├── requirements.txt  # Project dependencies
├── setup.py         # Package configuration
├── LICENSE          # MIT License
├── CONTRIBUTING.md  # Contribution guidelines
└── README.md        # This file

Recording Format

Recordings are stored in JSON format with the following structure:

{
  "version": "1.0",
  "timestamp": "2024-10-31T12:00:00",
  "events": [
    {
      "type": "mouse_move",
      "timestamp": 1.234,
      "x": 100,
      "y": 200
    }
    // ... more events
  ]
}

Platform Support

  • Linux (Full support)
  • Windows (Full support)
  • macOS (Basic support)

Contributing

We welcome contributions! Please see our Contributing Guidelines for details on how to:

  • Report bugs
  • Suggest enhancements
  • Submit pull requests
  • Set up development environment

Support

For support, questions, or feature requests:

  1. Check the issues page
  2. Create a new issue if needed
  3. Join our discussions

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Thanks to the pynput library for providing robust input device monitoring
  • Inspired by the need for reliable UI automation tools

Made with ❤️

Metadata

Release files for interactflow 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for interactflow 1.0.3
File Size Uploaded
interactflow-1.0.3.tar.gz 9.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for interactflow 1.0.3
File Interpreter ABI Platform
interactflow-1.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 18.4 kB

Release files / interactflow-1.0.3.tar.gz

Download URL interactflow-1.0.3.tar.gz
Size 9.4 kB
Tags Source
SHA-256 checksum
How to use checksums
72e975302a91817cc9b73fb85ee2c65c5ec4ce64ff3089a0bb2f67b6c8e9836b
BLAKE2b-256 checksum
How to use checksums
a9b74e9ce14c524a8578277f5f32a3af1beb7932a503fddb09325c35b9d77f0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.20

Release files / interactflow-1.0.3-py3-none-any.whl

Download URL interactflow-1.0.3-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8e224126d214a9ccccabed0606817fbeba09caced58e4e80070c04b9cd940b9a
BLAKE2b-256 checksum
How to use checksums
277d4fce27555d1603b167755197bfedd266bf4b98e4c59e729d96bd0bfb5fd1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.20

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 release files

1.0.2

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page