CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-eel

For little HTML GUI applications, with easy Python/JS interop

Pending

Quality

Pending

Does it follow best practices?

Impact

Pending

No eval scenarios have been run

Overview
Eval results
Files

browser-management.mddocs/

Browser Management

Browser-specific modules and functions for launching Eel applications in different browsers with custom configurations and platform-specific optimizations.

Capabilities

Browser Configuration

Set custom browser executable paths and retrieve configured paths.

# From eel.browsers module
def set_path(browser_name: str, path: str) -> None:
    """
    Set custom browser executable path.
    
    Parameters:
    - browser_name: str - Browser identifier ('chrome', 'electron', 'edge', 'msie')
    - path: str - Full path to browser executable
    
    Returns:
    None
    """

def get_path(browser_name: str) -> Optional[str]:
    """
    Get configured browser executable path.
    
    Parameters:
    - browser_name: str - Browser identifier
    
    Returns:
    Optional[str] - Path to browser executable or None if not set
    """

def open(start_pages: Iterable[Union[str, Dict[str, str]]], options: OptionsDictT) -> None:
    """
    Open pages in configured browser.
    
    Parameters:
    - start_pages: Iterable[Union[str, Dict[str, str]]] - Pages to open
    - options: OptionsDictT - Browser and display options
    
    Returns:
    None
    """

Usage Examples:

import eel
import eel.browsers

# Set custom Chrome path
eel.browsers.set_path('chrome', '/opt/google/chrome/chrome')

# Get configured path
chrome_path = eel.browsers.get_path('chrome')
print(f"Chrome path: {chrome_path}")

# Start with custom browser configuration
eel.init('web')
eel.start('index.html', mode='chrome')

Chrome/Chromium Support

Auto-detection and launching of Chrome or Chromium browsers with app mode support.

# From eel.chrome module
name: str = 'Google Chrome/Chromium'

def run(path: str, options: OptionsDictT, start_urls: List[str]) -> None:
    """
    Launch Chrome/Chromium with specified options.
    
    Parameters:
    - path: str - Path to Chrome executable
    - options: OptionsDictT - Configuration options
    - start_urls: List[str] - URLs to open
    
    Returns:
    None
    """

def find_path() -> Optional[str]:
    """
    Auto-detect Chrome/Chromium executable path.
    
    Returns:
    Optional[str] - Path to Chrome executable or None if not found
    """

Platform Detection:

  • Windows: Registry-based detection
  • macOS: Application bundle detection with Spotlight fallback
  • Linux: Multiple binary name detection (chromium-browser, chromium, google-chrome, google-chrome-stable)

Usage Example:

import eel

eel.init('web')

# Launch in Chrome app mode (default)
eel.start('app.html', mode='chrome', app_mode=True)

# Launch in Chrome regular mode
eel.start('app.html', mode='chrome', app_mode=False)

# Custom Chrome arguments
eel.start('app.html', 
          mode='chrome',
          cmdline_args=['--start-fullscreen', '--disable-web-security'])

Electron Support

Support for running Eel applications in Electron for enhanced desktop integration.

# From eel.electron module
name: str = 'Electron'

def run(path: str, options: OptionsDictT, start_urls: List[str]) -> None:
    """
    Launch Electron with specified options.
    
    Parameters:
    - path: str - Path to Electron executable
    - options: OptionsDictT - Configuration options
    - start_urls: List[str] - URLs to open
    
    Returns:
    None
    """

def find_path() -> Optional[str]:
    """
    Auto-detect Electron executable path.
    
    Returns:
    Optional[str] - Path to Electron executable or None if not found
    """

Usage Example:

import eel

eel.init('web')

# Launch with Electron
eel.start('main.html', mode='electron')

# Custom Electron arguments
eel.start('app.html',
          mode='electron', 
          cmdline_args=['--enable-logging'])

Microsoft Edge Support

Support for Microsoft Edge browser on Windows systems.

# From eel.edge module
name: str = 'Edge'

def run(_path: str, options: OptionsDictT, start_urls: List[str]) -> None:
    """
    Launch Microsoft Edge with specified options.
    
    Parameters:
    - _path: str - Path parameter (unused for Edge)
    - options: OptionsDictT - Configuration options
    - start_urls: List[str] - URLs to open
    
    Returns:
    None
    """

def find_path() -> bool:
    """
    Check if Microsoft Edge is available.
    
    Returns:
    bool - True if Edge is available (Windows only)
    """

Usage Example:

import eel

eel.init('web')

# Launch with Edge
eel.start('index.html', mode='edge')

# Edge in app mode
eel.start('app.html', mode='edge', app_mode=True)

Internet Explorer Support

Legacy support for Internet Explorer through Edge redirection.

# From eel.msIE module
name: str = 'MSIE'

def run(_path: str, options: OptionsDictT, start_urls: List[str]) -> None:
    """
    Launch Internet Explorer (redirects to Edge).
    
    Parameters:
    - _path: str - Path parameter (unused)
    - options: OptionsDictT - Configuration options  
    - start_urls: List[str] - URLs to open
    
    Returns:
    None
    """

def find_path() -> bool:
    """
    Check if IE is available.
    
    Returns:
    bool - True if available (Windows only)
    """

Custom Browser Mode

Use custom browser commands and configurations.

Usage Example:

import eel

eel.init('web')

# Custom browser command
eel.start('app.html', 
          mode='custom',
          cmdline_args=['firefox', '--new-window'])

# No browser (server only)
eel.start('app.html', mode=False)  # or mode=None

Browser Mode Options

Available browser modes for the mode parameter in eel.start():

  • 'chrome' - Google Chrome/Chromium (default)
  • 'electron' - Electron framework
  • 'edge' - Microsoft Edge
  • 'msie' - Internet Explorer (legacy)
  • 'custom' - Custom browser command via cmdline_args
  • False or None - No browser (server only)

Browser-Specific Options

App Mode vs Regular Mode

# App mode (no browser UI)
eel.start('app.html', mode='chrome', app_mode=True)

# Regular browser mode (with address bar, etc.)
eel.start('app.html', mode='chrome', app_mode=False)

Command Line Arguments

# Chrome-specific flags
eel.start('app.html', 
          mode='chrome',
          cmdline_args=[
              '--disable-http-cache',
              '--disable-web-security', 
              '--allow-running-insecure-content',
              '--start-fullscreen'
          ])

# Electron-specific flags  
eel.start('app.html',
          mode='electron',
          cmdline_args=['--enable-logging', '--remote-debugging-port=9222'])

Window Geometry

# Single window size and position
eel.start('main.html',
          size=(1200, 800),
          position=(100, 50))

# Per-page geometry
eel.start('main.html',
          geometry={
              'main.html': {'size': (1200, 800), 'position': (100, 50)},
              'settings.html': {'size': (600, 400), 'position': (200, 100)}
          })

Install with Tessl CLI

npx tessl i tessl/pypi-eel

docs

async-operations.md

browser-management.md

build-tools.md

core-functions.md

index.md

tile.json