No project description provided
Project description
PyWry Web Viewer
Easily create HTML webviewers in python utilizing the wry library. Please note: this library is currently in early alpha and is NOT ready for production use.
Installation
PyWry is available on PyPI and can be installed with pip:
pip install pywry
For development, you can install from source with the following steps:
- Clone the repository:
git clone https://github.com/OpenBB-finance/pywry.git
- Install rust:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
- Create a virtual environment:
python -m venv venv
- Acitvate the environment:
source venv/bin/activate
(Unix) orvenv\Scripts\activate
(Windows) - Install dependencies:
pip install .[dev]
- Build the pip package:
maturin build
- Install the package:
pip install [file path from above] --force-reinstall
Usage
>>> from pywry import PyWry
>>> handler = PyWry()
>>> handler.send_html("<h1>Welcome to plotting in PyWry</h1>")
>>> handler.start()
Note: There is currently an issue if you try to run this inside an X86_64 conda environment on an M1 machine.
Arguments
Argument | Description | Default |
---|---|---|
html_str |
The HTML string to display in the webview | None |
html_path |
The path to the HTML file to display in the webview | None |
title |
The title of the webview | PyWry |
Platform-specific notes
All platforms use TAO to build the window, and wry re-exports it as an application module. Here is the underlying web engine each platform uses, and some dependencies you might need to install.
Linux
Tao uses gtk-rs and its related libraries for window creation and wry also needs WebKitGTK for WebView. So please make sure the following packages are installed:
Arch Linux / Manjaro
sudo pacman -S webkit2gtk-4.0
Debian / Ubuntu
sudo apt install libwebkit2gtk-4.0-dev
Fedora / CentOS / AlmaLinux
sudo dnf install gtk3-devel webkit2gtk4.0-devel
macOS
WebKit is native to macOS, so no additional dependencies are needed.
Windows
WebView2 provided by Microsoft Edge Chromium is used. So wry supports Windows 7, 8, 10 and 11.
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 Distributions
Hashes for pywry-0.4.2-cp311-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed6c2f29317792c269dae33b2402f3dae64bfb93341ad9fe8f162a37e4b2402d |
|
MD5 | 666ce62daa367c044944de45065deabb |
|
BLAKE2b-256 | d57d4d61d4dd0265d0e78caca17f7123581f51e411bfa4c1655de5de3c27f3e3 |
Hashes for pywry-0.4.2-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4752d28783fa6093822923a39d9e3ee5b1c0168fd2805f05690f6d02ecbe4a6e |
|
MD5 | 830babe9887e9621a6162d97af7ad8c2 |
|
BLAKE2b-256 | 4d689ec9cdf8ee078d03cc675fac0afbc1aa6d66a88725fab7261dce36d440b5 |
Hashes for pywry-0.4.2-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1bfc713eb5ff235bcd72e231c7cd3ff23c6a08729dbfdd9e7e3a9eb785ca5bf2 |
|
MD5 | b98bc826e57a2c79ace53b8e1a0016fd |
|
BLAKE2b-256 | b62ce97208a1c5c06fe00bf93fb5b045ffc1b18bd4e0161a19a4a2ab933e8582 |
Hashes for pywry-0.4.2-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64ac297ded49dc3996a04ab0a4748bc17f3f8905284f72a2a27aa21b30f8a29c |
|
MD5 | 19e4ce13916c90e245600a710beadf75 |
|
BLAKE2b-256 | ae471eaafc4c5351fd153e2a49a987c7ae921591579921dc096b66294b82aca9 |
Hashes for pywry-0.4.2-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e620b55bad8e3473e70205dfe5c295bc432c8ba6f572bb70bda424b79f970327 |
|
MD5 | f8ef2ef65c5e46ed9062bcd10d39ef96 |
|
BLAKE2b-256 | 7e3d197494ea56dc0221e6ce0886fb24de5077caca03ac4c63433693ff6170bf |
Hashes for pywry-0.4.2-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3e1603755983fca0ddd4407e580e81c17a6159b0a5a44ce1fea7b9ffc2ac25f |
|
MD5 | 0e9d0800e6fe0a9a4c12aa3c4c1cf3ec |
|
BLAKE2b-256 | 864911578e988ea5cb0757e96910ad47bed30a63454d537644d6eb12ca89bfb0 |
Hashes for pywry-0.4.2-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d907df3dada9666fa24a856044b6814e0c0eeeb9a1754889f19c4aa0fd487e9 |
|
MD5 | 993326e1dc330c351977d20bef0deb2e |
|
BLAKE2b-256 | ec3ce1ac956b355615537e9c46f8d22e134bc0e0cae1a93a81fe82745b055a5a |
Hashes for pywry-0.4.2-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1d39a78a3dc3333b6f1cb67e2f4a4f6275b9bc690ecb460a7b9843a8a847f26 |
|
MD5 | 2607930d19420d840bc273931f215304 |
|
BLAKE2b-256 | b5891c8c89d359dedf3b13a16fc608f047c2972e2daabf4b9d50ca0c72d42c5c |
Hashes for pywry-0.4.2-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f03bde569ddf9a6aa28e39c927d25222226abcb19fd74688d3e9dbe1169e8852 |
|
MD5 | 07c84d67a0255f12ba31069b3a5a4d94 |
|
BLAKE2b-256 | d4983740fc689b0c904f997891692f88cfdd9dfdb93cc0d23ba6d75c456f2f99 |
Hashes for pywry-0.4.2-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | baa6f39546dc56be53ae7f1b8a5096619fe536ca804157c4ede4aa241468f135 |
|
MD5 | b7556b98f5830a897a20cdfab5fc80ac |
|
BLAKE2b-256 | 20d486772e46a1145910a57947c189b8cb19e4d8869087f86302fa832662ebea |
Hashes for pywry-0.4.2-cp38-cp38-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4af442137b8c300f0fc3a820270c2ec829431b374ef3dc7a9e975cfc62a75ccc |
|
MD5 | 476298b054b408c04f77b07251525a35 |
|
BLAKE2b-256 | 6aab2119a08918ceeeec87281076cc1256c3dea418e44c1fbef708ec5bdf1bc9 |
Hashes for pywry-0.4.2-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d4bc106100c4f72c9d1e899ac7f21087368244d822d67792ca0f30446deb1bc |
|
MD5 | 9ebe05073f79b071468913311b6395a1 |
|
BLAKE2b-256 | f2dec963b8d24a9f41d9384ea8f8e8f0849fd5189a75133f926e7a21dd9fdbae |