
Security News
The Nightmare Before Deployment
Season’s greetings from Socket, and here’s to a calm end of year: clean dependencies, boring pipelines, no surprises.
rh
Advanced tools
Transform variable relationships into interactive web applications with real-time updates.
from rh import MeshBuilder
# Define relationships between variables
mesh_spec = {
"temp_fahrenheit": ["temp_celsius"],
"temp_kelvin": ["temp_celsius"],
}
# Define how to compute each relationship
functions_spec = {
"temp_fahrenheit": "return temp_celsius * 9/5 + 32;",
"temp_kelvin": "return temp_celsius + 273.15;",
}
# Set initial values
initial_values = {
"temp_celsius": 20.0
}
# Create and build the app
builder = MeshBuilder(mesh_spec, functions_spec, initial_values)
app_path = builder.build_app(title="Temperature Converter")
# Serve it locally
builder.serve(port=8080)
Variable names automatically determine UI behavior:
initial_values = {
"slider_opacity": 50, # → Range slider (0-100)
"readonly_result": 0, # → Read-only display
"hidden_internal": 10, # → Hidden field
"color_theme": "#ff0000", # → Color picker
"date_created": "2023-01-01" # → Date input
}
# Physics calculator with custom field overrides
mesh_spec = {
"kinetic_energy": ["mass", "velocity"],
"momentum": ["mass", "velocity"],
"total_energy": ["kinetic_energy", "potential_energy"]
}
functions_spec = {
"kinetic_energy": "return 0.5 * mass * velocity * velocity;",
"momentum": "return mass * velocity;",
"total_energy": "return kinetic_energy + potential_energy;"
}
field_overrides = {
"mass": {
"title": "Mass (kg)",
"minimum": 0.1,
"maximum": 1000,
"ui:help": "Object mass in kilograms"
}
}
builder = MeshBuilder(mesh_spec, functions_spec,
initial_values={"mass": 10, "velocity": 5, "potential_energy": 100},
field_overrides=field_overrides)
Run the test suite:
# Run pytest discovery from the project root (recommended)
python -m pytest
Try the examples:
python demo.py # Multiple example apps
python example.py # Simple temperature converter with server
python persistent_apps_example.py # Shows app directory management
RH automatically manages app storage for persistent applications:
builder = MeshBuilder(mesh_spec, functions_spec, initial_values)
# App name inferred from title, stored in RH_APP_FOLDER
app_path = builder.build_app(title="Temperature Converter")
# Creates: ~/.rh/apps/temperature_converter/index.html
# Explicit app name
app_path = builder.build_app(title="My App", app_name="custom_name")
# Creates: ~/.rh/apps/custom_name/index.html
from rh.util import RH_APP_FOLDER, get_app_directory
# Check current app folder location
print(f"Apps stored in: {RH_APP_FOLDER}")
# Get path for specific app
app_dir = get_app_directory("my_calculator")
Control where RH stores apps by setting environment variables:
# Custom app folder location
export RH_APP_FOLDER="/path/to/my/apps"
# Custom local data folder (apps will be in $RH_LOCAL_DATA_FOLDER/apps)
export RH_LOCAL_DATA_FOLDER="/path/to/my/data"
For full control over output location:
builder = MeshBuilder(mesh_spec, functions_spec, initial_values)
builder.output_dir = "/path/to/specific/location"
app_path = builder.build_app(title="My App")
This section communicates the design principles and architectural decisions that guide the development of RH, helping both users understand the framework's approach and contributors align with the project's vision. Contributors are welcome!!!
🧩 Declarative over Imperative
🔄 Convention over Configuration
slider_*, readonly_*, hidden_*)⚡ Functional Programming & Immutability
📐 Clean Architecture
┌─────────────────┐
│ MeshBuilder │ ← Facade/Interface Layer
│ (Facade) │
├─────────────────┤
│ Generators │ ← Application Logic
│ • HTML │
│ • RJSF Schema │
├─────────────────┤
│ Core Logic │ ← Business Logic
│ • Type Inference│
│ • Propagation │
│ • Validation │
├─────────────────┤
│ Infrastructure │ ← Framework/Tools
│ • HTTP Server │
│ • File I/O │
│ • Templates │
└─────────────────┘
🔧 Separation of Concerns
🎯 Single Source of Truth (SSOT)
generate_config() method produces the canonical representation🔌 Dependency Injection & Plugin Architecture
📚 Zero Dependencies by Design
🧪 Test-Driven Development
📖 Documentation as Code
🌱 Incremental Complexity
🤝 What We Welcome
🎨 Code Style Expectations
🏗️ Architectural Consistency
🔍 Testing Philosophy
This framework embodies the principle that complexity should be in the implementation, not the interface. Users describe simple relationships; the framework handles the complexity of turning those into rich, interactive applications.
MIT License - see LICENSE file for details.
FAQs
Reactive Html Framework - Transform variable relationships into interactive web apps
We found that rh demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Season’s greetings from Socket, and here’s to a calm end of year: clean dependencies, boring pipelines, no surprises.

Research
/Security News
Impostor NuGet package Tracer.Fody.NLog typosquats Tracer.Fody and its author, using homoglyph tricks, and exfiltrates Stratis wallet JSON/passwords to a Russian IP address.

Security News
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.