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
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.3.10-cp311-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 876fcf9108bb1d24f8c1e5626cb49a5f22f5043faa803c117cd2eaafbedad7e0 |
|
MD5 | 897dabe75af19cc3aea82f24eb1ae829 |
|
BLAKE2b-256 | 5b0e01a64b268ac26c5dae6e29e541f3284ac7fb3aa011897d552a06717db705 |
Hashes for pywry-0.3.10-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5428b737a79fdac34f31fc3f07aabbefaba8cb8d7aee6bf05a644d08e172704c |
|
MD5 | 2918a61518c59337d46f1745322d9840 |
|
BLAKE2b-256 | 84ea06b16f920b9fe66401dd831050db95a43743e5bfbf88b443912a368e2e8c |
Hashes for pywry-0.3.10-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 958018184befc033b938ffc6e9473978ad0b2179dc6dc6e798d1fd42342374cd |
|
MD5 | 8a1cd51d44fcf0da3f59a129d2c6ab33 |
|
BLAKE2b-256 | 7940dbb4dcf830a3472210c7a7e875f6b6b684cbefc075f74c5bff216d0323c2 |
Hashes for pywry-0.3.10-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e2175d91b8c05c72096dd805de2c9fbfea24c6213697e65ba649ecc68385bbf |
|
MD5 | ead3af12e60d170322033daced674ee6 |
|
BLAKE2b-256 | bc4773dd204733b8fdd6af672e589cbdf7fc2f71657d0ba4e01088383168e148 |
Hashes for pywry-0.3.10-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 371e7b75319a1f17600c525a99cc5dd3bba11012ba5a60be431be931393ecf77 |
|
MD5 | 0c923fbfefa37e17bc37b75326f2f2c0 |
|
BLAKE2b-256 | 292208f83868f4b2dc58698a98dfa47b658615aeb196d562bfa47c24f480fd98 |
Hashes for pywry-0.3.10-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9116d2253cc597ea67fc6d495795e7ddf301dba22a2fc8319af44063abc1edbd |
|
MD5 | 7d7cdf8a082981f8e05c9fcaa085af2e |
|
BLAKE2b-256 | cdbd7522058adc9d4390cfd9f562c2308daff35c190930ab7a13160d34cabd0e |
Hashes for pywry-0.3.10-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 388f71a52027b218fce9e3f2ef126728c0191416cf846a87b61a5b0d9e2f1cdb |
|
MD5 | 3f0757b12a9314ceb09732c076d942e7 |
|
BLAKE2b-256 | a1c786008cf3c768164cb3387f6f78ad40a94d5359d8b640ce3537677d156d96 |
Hashes for pywry-0.3.10-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6256670f8d58b0ca338aa61b8109a2cf687e932b400a03096119e4b66d6447eb |
|
MD5 | e031b2b960bb23d9640b24f91c84cfcb |
|
BLAKE2b-256 | afbc3877b4206f737a5780e9fa01007300b8f77df38a2e99afb37a21b35e9c45 |
Hashes for pywry-0.3.10-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c53dfaf66bc5fa37b473c975e2ce6da1a1189caeb441c5c78e590d1508fca0db |
|
MD5 | b70a671b5e75a885ae73b30642921be2 |
|
BLAKE2b-256 | be1614446342bc6b12ce8c7c103c19430996309e2e879f606dba2512c47c341f |
Hashes for pywry-0.3.10-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15d076ac77484e0bb135a2d208e867352f7f4a2b0c8132b22233d4a62a1822dd |
|
MD5 | 6352e08e75e54a63baa46604fc66bcc7 |
|
BLAKE2b-256 | 71292233dd80ef075ff603e67e0fb7c6765c35f71ff5b8ad1fdc304cdd64185b |
Hashes for pywry-0.3.10-cp38-cp38-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0cbde1404b783f6fd5774d63e1aee40baf9f95d434482a9b1d08fef58e18bab |
|
MD5 | 32d570bfa16bd3e5fa3ee904b9535d54 |
|
BLAKE2b-256 | 35a4752819e81374ad9bad22c04349ebd1ed893f72749c402cb3c9921504a49f |
Hashes for pywry-0.3.10-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bddb158bad66a45eb6f6c80b016962cc2b7dd86b32f91a984640a0acc2cfe6a1 |
|
MD5 | cee1f08477c5b9229267b244c3b7d185 |
|
BLAKE2b-256 | 68fdc5c45aea4985cde8a5ec062ffe3218f728a695b699b0d9ff1dff0c632e17 |