Skip to content
/ core Public

Gloom is a conversation engine built in C++ and Rust that emphasizes pluggable architecture and platform independence.

License

Notifications You must be signed in to change notification settings

askgloom/core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gloom Core

Gloom Core

Python Version PyPI version License: MIT

Core browser automation framework for Ask Gloom. Provides a high-level interface for browser control, profile management, and automation tasks.

Features

  • Simplified browser automation with intelligent recovery
  • Advanced profile management and persistence
  • Flexible configuration system
  • Screenshot and visual comparison capabilities
  • Automatic driver management and updates
  • Comprehensive error handling and logging
  • Cross-platform support (Windows, Linux, macOS)

Installation

pip install gloom-core

Quick Start

Basic browser automation:

from askgloom.core import Browser

# Initialize and use browser with context manager
with Browser() as browser:
    browser.navigate("https://crate.lol")
    browser.screenshot("homepage.png")
    
    # Get page content
    title = browser.get_element_text("h1.title")
    print(f"Page title: {title}")

Custom profile configuration:

from askgloom.core import Profile, Browser

# Create custom profile
profile = Profile("my_profile")
profile.preferences.update({
    "browser": {
        "window_size": {"width": 1920, "height": 1080},
        "user_agent": "Custom User Agent",
        "download_path": "/custom/download/path"
    }
})
profile.save_preferences()

# Use profile with browser
with Browser(profile=profile) as browser:
    browser.navigate("https://crate.lol")

Advanced configuration:

from askgloom.core import Config, Browser

# Configure browser behavior
config = Config()
config.set("browser.headless", True)
config.set("automation.retry_attempts", 5)
config.set("automation.screenshot_on_error", True)

# Use configuration
browser = Browser(options=config.get("browser"))

Documentation

For detailed documentation, visit crate.lol/docs

Setup

# Clone the repository
git clone https://github.com/ask-gloom/gloom-core.git
cd gloom-core

# Create a virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install development dependencies
pip install -e ".[dev]"

Testing

# Run tests
pytest

# Run tests with coverage
pytest --cov=askgloom

# Run specific test category
pytest tests/test_browser.py -v

Code Quality

# Format code
black askgloom tests
isort askgloom tests

# Type checking
mypy askgloom

# Lint
flake8 askgloom tests

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'feat: Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

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

Acknowledgments


Made by Ask Gloom

About

Gloom is a conversation engine built in C++ and Rust that emphasizes pluggable architecture and platform independence.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages