A tool for working with real-time program schedules
Project description
Rhylthyme
๐ rhylthyme (pronounced "realtime") is a JSON-based workflow language for describing and executing real-time event scheduling.
๐ Quick Start
American Breakfast Example
Here's a simple program that coordinates cooking eggs, bacon, and toast to finish at the same time:
# Navigate to the CLI runner directory
cd rhylthyme-cli-runner
# Validate the breakfast program
python -m rhylthyme_cli_runner.cli validate ../rhylthyme-examples/programs/breakfast_schedule.json
# Run the breakfast program
python -m rhylthyme_cli_runner.cli run ../rhylthyme-examples/programs/breakfast_schedule.json
๐ซ What is Rhylthyme?
Rhylthyme provides a structured way to define real-time programs (schedules) consisting of multiple parallel tracks with sequential steps. Originally designed for time-critical rat experiments, it now accommodates various scheduling scenarios:
- ๐ณ Food Production: Restaurant kitchens, bakery operations, meal coordination
- ๐ฌ Laboratory Research: Experimental protocols, sample processing workflows
- โ๏ธ Operations Management: Airport scheduling, event planning, logistics
- ๐ญ Manufacturing: Assembly lines, quality control, batch processing
- ๐ฌ Media Production: Film scheduling, broadcast coordination
๐ฏ Key Features
- Multi-track Execution: Run multiple parallel tracks of operations
- Resource Constraints: Enforce equipment/station availability limits
- Actor Constraints: Track and limit human attention/involvement
- Rich Start Triggers: Time-based, dependency-based, or manual triggers
- Buffer Support: Pre/post-step buffers with runtime extension capability
- Variable Durations: Fixed, variable, or indefinite step durations
- Interactive Control: Manual triggers and real-time adjustments
- Environment Catalog: Reusable environment and resource definitions
- Real-time Monitoring: Track progress with adjustable time scaling
- Schema Validation: Comprehensive program validation
For detailed information, see the Features Guide.
๐ Example Program
Here's a simple breakfast preparation program:
{
"programId": "breakfast-prep",
"name": "Breakfast Preparation",
"environment": "home-kitchen",
"startTrigger": {"type": "manual"},
"tracks": [
{
"trackId": "eggs",
"name": "Scrambled Eggs",
"steps": [
{
"stepId": "fry-eggs",
"name": "Fry Eggs",
"startTrigger": {"type": "programStart"},
"task": "stove-burner",
"duration": {"type": "fixed", "seconds": 180}
}
]
}
]
}
Environment with Resource Constraints
{
"environmentId": "home-kitchen",
"actors": 2,
"resourceConstraints": [
{
"task": "stove-burner",
"maxConcurrent": 4,
"actorsRequired": 1.0
},
{
"task": "oven",
"maxConcurrent": 1,
"actorsRequired": 0.5
}
]
}
๐ ๏ธ Installation
Note: Rhylthyme packages are currently in development and must be installed from local directories.
Quick Installation
# Clone the repository
git clone https://github.com/yourusername/rhylthyme.git
cd rhylthyme
# Create virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install core packages
pip install -e ./rhylthyme-spec
pip install -e ./rhylthyme-cli-runner
pip install -e ./rhylthyme-web
# Verify installation
rhylthyme --help
For detailed installation instructions, see the Installation Guide.
๐โโ๏ธ Usage
CLI Runner
# Validate a program
rhylthyme validate programs/example.json
# Run a program with interactive terminal UI
rhylthyme run programs/example.json
# Run with automatic start and 2x speed
rhylthyme run programs/example.json --auto-start --time-scale 2.0
# Optimize a program schedule
rhylthyme plan programs/example.json optimized.json
# List available environments
rhylthyme environments
# Get help
rhylthyme --help
Interactive Controls
When running a program, use these keyboard controls:
- Space: Start/stop program
- Enter: Trigger manual steps
- Arrow keys: Navigate between steps
- q: Quit
- r: Refresh display
Web Visualizer
Start the web server:
rhylthyme-web
Then open http://localhost:5000 in your browser. You can:
- Upload a local .json or .yaml file
- Paste a URL to load from https
- Try examples with one click
Options:
rhylthyme-web --port 8080 --debug
Command Line Visualization
# Generate and open visualization in browser
rhylthyme-visualize program.json
# Save to specific file without opening browser
rhylthyme-visualize program.json -o output.html --no-browser
Importers
Import schedules from external sources:
# Install importers
pip install -e ./rhylthyme-importers
# Search TheMealDB for recipes
rhylthyme-import search "chicken curry" -i themealdb
# Import a recipe
rhylthyme-import import "52772" -o curry.json --pretty
# Import a random meal
rhylthyme-import mealdb random -o random_meal.json
# Import from protocols.io (requires API token)
export PROTOCOLS_IO_TOKEN="your_token"
rhylthyme-import search "western blot" -i protocolsio
The web chat also supports importing - just ask Claude to "import a recipe for lasagna" or "find me a chicken recipe".
๐ Project Structure
rhylthyme/
โโโ rhylthyme-spec/ # Schema definitions
โโโ rhylthyme-cli-runner/ # Command-line interface
โโโ rhylthyme-web/ # Web visualizer & DAG generator
โโโ rhylthyme-importers/ # Import plugins (TheMealDB, protocols.io)
โโโ rhylthyme-examples/ # Example programs & environments
โโโ rhylthyme-docs/ # Documentation website
โโโ rhylthyme-mcp-server/ # MCP server implementation
โโโ docs/ # Core documentation
โโโ extensions/ # Extensions and integrations
โโโ DOCUMENTATION_INDEX.md # Complete documentation index
๐ Documentation
Quick Links
- ๐ Documentation Index - Complete guide to all documentation
- ๐ Getting Started Tutorial - Complete beginner's guide with examples
- ๐ Quick Start - Get started in minutes
- ๐ Schema Guide - Complete schema documentation
- โก Features - Detailed feature descriptions
- ๐ง Installation - Detailed setup instructions
Tool Documentation
- ๐ฎ Program Runner - Interactive execution
- โ Validator - Program validation
- ๐ Environment Catalog - Resource management
- ๐ Web Visualizer - DAG visualization
- ๐ฅ Importers - TheMealDB & protocols.io import
Integration Guides
- ๐ Marimo Integration - Notebook interface
- ๐ MCP Server - Model Context Protocol
๐ Examples
Explore working examples in the rhylthyme-examples directory:
breakfast_schedule.json- Simple breakfast coordinationlab_experiment.json- Laboratory protocol workflowbakery_program_example.json- Complex bakery productionairport_program_example.json- Airport operations schedulingrat_psychopharmacology.json- Research experiment timing
๐ค Contributing
We welcome contributions! See individual repository README files for specific contribution guidelines.
Getting Started
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests and documentation
- Submit a pull request
๐ License
Apache License 2.0 - see LICENSE file for details.
๐ Support
- ๐ Issues: GitHub Issues
- ๐ฌ Discussions: GitHub Discussions
- ๐ Documentation: Documentation Index
- ๐ง Contact: See individual repository contacts
Rhylthyme: Making time-critical workflows as smooth as a perfect rhythm. ๐ต
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rhylthyme-0.1.0.tar.gz.
File metadata
- Download URL: rhylthyme-0.1.0.tar.gz
- Upload date:
- Size: 165.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9182f11a96161705bd5bcc5e004ec7acbe947971e5d8261665fe892f1df563d
|
|
| MD5 |
a8198282bdc658bc2f8081ae4df2473c
|
|
| BLAKE2b-256 |
0ee004ee526f05bfc178fcf3ae59be55a1bf53078527d41140f0bc7d97ae9cf4
|
File details
Details for the file rhylthyme-0.1.0-py3-none-any.whl.
File metadata
- Download URL: rhylthyme-0.1.0-py3-none-any.whl
- Upload date:
- Size: 169.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37363d1e6e26186d8fe64c6e8e6df8b0059920818985830c154b585cb63f1a0f
|
|
| MD5 |
e6586d48d9ba27dd6143e45cf76f3668
|
|
| BLAKE2b-256 |
7e860b4647a53e9ec56a21b1176c46f39013a6c3cc03c943755545be96958f93
|