Pre-release
This release is a pre-release and may not be stable for production use.
SWEer
Dev setup
pip install -e '.[dev]'
pre-commit install
pytest
Usage
First, start the backend
sweer-backend
Next, start running commands
# If argument is an existing local path, will try to open local file instead
sweer open theguardian.com
sweer screenshot
sweer click 0
Configuration
SWEer can be configured using environment variables:
Browser Configuration
You can configure which browser backend to use:
# Use Firefox instead of the default Chromium
export SWEER_BROWSER_TYPE="firefox"
sweer-backend
# Use Chromium (default)
export SWEER_BROWSER_TYPE="chromium"
sweer-backend
Supported browser types:
chromium(default) - Uses Chromium browserfirefox- Uses Firefox browser
Custom Browser Executable Paths
You can specify custom installations of browsers instead of using Playwright's default bundled browsers:
# Use a custom Chromium installation
export SWEER_CHROMIUM_EXECUTABLE_PATH="/usr/bin/chromium-browser"
export SWEER_BROWSER_TYPE="chromium"
sweer-backend
# Use a custom Firefox installation
export SWEER_FIREFOX_EXECUTABLE_PATH="/usr/bin/firefox"
export SWEER_BROWSER_TYPE="firefox"
sweer-backend
This is useful when:
- You want to use a system-installed browser instead of Playwright's bundled version
- You need to use a specific browser version
- You want to use a browser with custom configurations or extensions pre-installed
- You're working in an environment where Playwright's bundled browsers aren't available
Other Configuration Options
# Enable automatic screenshotting after each action
export SWEER_AUTOSCREENSHOT="1"
# Configure window size
export SWEER_WINDOW_WIDTH="1280"
export SWEER_WINDOW_HEIGHT="720"
# Run browser in headed mode (visible window)
export SWEER_HEADLESS="0"
# Change screenshot delay (in seconds)
export SWEER_SCREENSHOT_DELAY="0.5"
If navigating a lot, you can activate automatic screenshotting with
export SWEER_AUTOSCREENSHOT="1"
Metadata
Release files for sweer 1.0.0.dev5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sweer-1.0.0.dev5.tar.gz | 20.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sweer-1.0.0.dev5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 35.0 kB
Release files / sweer-1.0.0.dev5.tar.gz
| Download URL | sweer-1.0.0.dev5.tar.gz |
|---|---|
| Size | 20.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
765ed020de3869c00d482a1f61620b937e232f021404cf8a0c9f7f9b1307b9e4
|
|
BLAKE2b-256 checksum How to use checksums |
31d717e76ca9887b9d001aa64cae1bdbeb60273f6aaecf3072ca6af55ed80d88
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Release files / sweer-1.0.0.dev5-py3-none-any.whl
| Download URL | sweer-1.0.0.dev5-py3-none-any.whl |
|---|---|
| Size | 15.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b0bed43ebbe326bd81a4b4dc5799a057a0beae474d2b93a35b33ab34cb1946e5
|
|
BLAKE2b-256 checksum How to use checksums |
aeecee564883da8e6e56ba984d164ad6a84bb8864e7128a3269384ce1844f774
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|