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.11-cp311-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6cad958f703d625f53dc0ccdbf503b43c24d5fbc6ae054c88819ff9872a7d1fc |
|
MD5 | 8ca4c40c03e049fc6703e1d0599f0e65 |
|
BLAKE2b-256 | 41abcf9574b5957bc7152c1cf8f888c521ad92383a07e0f643883fd0fe12474b |
Hashes for pywry-0.3.11-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19f7ff60bf200e967d15f340619894e289e766f8c37bd3e77f40475da08857e3 |
|
MD5 | 3ec63ae322e83cfd00fc84fae5faf84f |
|
BLAKE2b-256 | 6285019a572c4e99a0b2441e1398beedf5f9e11ae0d607853c5a30735d6c3219 |
Hashes for pywry-0.3.11-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10629d887f5dcdafcbc924a231627c2bbab7e13dd4cf695e3a0b9cbedc2ec9a7 |
|
MD5 | 62beab9d0c1485aeee20333da66a58b5 |
|
BLAKE2b-256 | 437f296d3cfe557ddb5964b9f595b3aafe627f62fd28021a275a240d06691012 |
Hashes for pywry-0.3.11-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef4b47aa35b771a9e6150fc3eed70d5fc94dc0dc8e352035f7704d4f0ba03c9d |
|
MD5 | b9f96b8734457f0799c4f53c4cd0cc03 |
|
BLAKE2b-256 | 6a59f9b01201b3a5802669ab93aaf29b1d9842552b02d66465b6fca47c4d3e61 |
Hashes for pywry-0.3.11-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3ccb280e6bff0d3af33f95607dcccd46f8ad68a76c66fe8669943db9336f762 |
|
MD5 | 647d3337394fb77a5f57963cab18ee9c |
|
BLAKE2b-256 | 6914587d5129e1102ed9eacd99ecb7b37aaab2a0626baa5bb05e13c679726f83 |
Hashes for pywry-0.3.11-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 048ae07517b610c5ca1da3ccacb8fd2fb739852970d8e52321a859bd26f2921e |
|
MD5 | ae37b7533cf4ee4060485f72651d285f |
|
BLAKE2b-256 | dbfb680729db78b68cef7a665fa1008ab1c6dfd80a3dbf241d1ba52e61f22e21 |
Hashes for pywry-0.3.11-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec1ce5ad3fd6b3b684a8f699e537666c7abc4c0a2dd4a7cd9c967a737af0039b |
|
MD5 | 31539dbeca207705935d46047ed8599c |
|
BLAKE2b-256 | 35bdc3f687e20c59ae6760db98d3d5e499543a2089c82a12dd49b5d744d336d9 |
Hashes for pywry-0.3.11-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33748b6cd52465d884a4f760ce47654cb390b0560f018fe0d4fe6f363d0d4b59 |
|
MD5 | 8f2ce3f60fda087ae97949ba904a91de |
|
BLAKE2b-256 | 764969c485532d491795bf6ff31133ff8d496a6da3944ee9596622a7bc567e40 |
Hashes for pywry-0.3.11-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b2472741d1aa6c7b47964cd082d9f81a9f9434cdaed2c870d8ccd8ce2b55201 |
|
MD5 | 23839d610cd50cfa696e7b0f00e2f33c |
|
BLAKE2b-256 | 6d4108685201392375551b26703c1e08c8bd3c0d057d156be19195e53f2d93fe |
Hashes for pywry-0.3.11-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad274ad806551512b0050c34a5030b34e5da8a377e176b4fa534a5e9f57ed0c3 |
|
MD5 | 5fb179035d89a67288c6684b801ec64a |
|
BLAKE2b-256 | 3098e7caa37b4de311755763ff4d6c13e2210fa7cd1a7e28c2f60ecb9ca5a8d1 |
Hashes for pywry-0.3.11-cp38-cp38-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ab3e0c77f66a5a1ac9670636506114099e1822d1a7d3f3ed7890ee4ddbf8ada |
|
MD5 | fda8e7f761b993eececc2b92bfc8cdb8 |
|
BLAKE2b-256 | d9e15e99d24088f9356ed672897150cd5ed9334ba01cee9c512c79f0167146c4 |
Hashes for pywry-0.3.11-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f56acf0e481e9db4553da1cf569b101b42afe9b750ca579ba2aedf674cb05e86 |
|
MD5 | cd6be2832d0e9ca8236942c4330a53f0 |
|
BLAKE2b-256 | a4fd3e82399250ad5b15f40eba37f01dbd8d76a2991dc8b4a60486d2d4459707 |