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.12-cp311-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d503e98b944fd4a1a517e66c4448f0fea06ae272a51143caa84ac44f33ccaa37 |
|
MD5 | 8efac99f88daf4db9123414d093f7a9c |
|
BLAKE2b-256 | a503bc49c01272331817424d69ab96d2df6bb7f9a661967712eb36b8261012ee |
Hashes for pywry-0.3.12-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8341da333decda4e6f22aefd312b81832e1341afaa248f5a6a48e59d313ea342 |
|
MD5 | 24d2ab3513b2b7a4d21e243d6991b999 |
|
BLAKE2b-256 | 55fa0264ddebca00d9419bff6d19b0bacb19b8aa01a1edab0ca4149f1f3f889c |
Hashes for pywry-0.3.12-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07985d92c5eb3267962b5c2e18211fe173bfa56629208129d136e30b553aa1f0 |
|
MD5 | b0a138438adb15300dbd7c50fa8f4a7f |
|
BLAKE2b-256 | 76d89ee690ce7bd5fb2a3375ac7f587332f66598ba9bb1883130e9e936b9bb76 |
Hashes for pywry-0.3.12-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21519d0ab19b3ff5243f84edc16c647d9e66882b3772e5dbc338aeb08deae548 |
|
MD5 | 1f3d96621e5e1d57c01540c5c7d083da |
|
BLAKE2b-256 | 58b4c747bb506710679bbf4ac83d9c6c13dffc99b2d0a3c9b845f89e751a48f2 |
Hashes for pywry-0.3.12-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | df4f5e9d8038837909266c9566a1e93c6e68b6d449f57cdecf3406f242102511 |
|
MD5 | 4fa1663969911b4b99a79f89b1f8fe4a |
|
BLAKE2b-256 | 4b6326e8e3c18f6c14364b74db64abee7588d7f4764ac125637dd808b8dfc72f |
Hashes for pywry-0.3.12-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8428a9b5e179e3e106be5efbf00e45195e5e6e45d83191099089c421ba82cf3a |
|
MD5 | 634892cc3bf02d87af2810dd0d2caffc |
|
BLAKE2b-256 | df4e9811512165d6adff3691cd0811689ff0232958b2c74e6300bb076714d261 |
Hashes for pywry-0.3.12-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c0020c59d9b686152305ddb54384e493a5bd3f535b8aa37a16c1b80342d3fb0 |
|
MD5 | 613b7b30d6e0ac44d7f83d317f7c8455 |
|
BLAKE2b-256 | 0c2ceb12135434dc76dd3e539d985efaed6b31c6444c13ed81a52e1d698e8893 |
Hashes for pywry-0.3.12-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91acfdb4011af982431ba0372f902baaf0bb794ca81361a93dee493e5682904e |
|
MD5 | da992f92b26060255fd120ce7dde6c35 |
|
BLAKE2b-256 | f8ce398c274146a07bba707b71a510c9b70c046bc59f4fd296c09c8f0ad59235 |
Hashes for pywry-0.3.12-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c0695cbc73edf533be6fb6c191e3ca862d25f82fecebfb4355f3545c9b51ff3 |
|
MD5 | 6bf9eac387174ac2bdf154bcb590a48f |
|
BLAKE2b-256 | 754960b3f06cb0ef1637659f2b8e91962b7610b523fdfa57f7e21394d2ac4626 |
Hashes for pywry-0.3.12-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f98f6585d814abcf70f37f92d50fe9a520e1e8f3eb242162c85fd27fcd7640e |
|
MD5 | eb10356944b749925f0ef0fac35fb8e0 |
|
BLAKE2b-256 | 2ee5ecdb18fa1f4d0c4e0c63de102317cf5e69342374610e8c4390a86d94caa9 |
Hashes for pywry-0.3.12-cp38-cp38-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fcd4290c9c3d09af2ff4d013cacd967c67d82f71406bb9628692d4798547f28b |
|
MD5 | 2bc4b67a990a12b401c05414ec9695cc |
|
BLAKE2b-256 | 94e4feb3d3542bfe3599c24c49c3e439479c322541b264c786ff253cdbba40b6 |
Hashes for pywry-0.3.12-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e8914b242b79dbc2556de1f96c54ad2dd4f6cf6697b3665af4f8612303f6e93 |
|
MD5 | cd8f1f71090bf46b2530165a0c0dfd69 |
|
BLAKE2b-256 | f0541cf287915953b3b224a64236f698b8807919e8a8d64e5d372ea975f36222 |