Skip to main content

Webcv

Webcv is a simple wrapper that can implements displaying images, text, and tables via web browsers.

This project is based on quart that requires python 3.7+. For older version of Python, please use webcv-gevent instead.

Installation

pip install webcv

Sample Usage

import sys

import numpy as np
from webcv import webcv


webcv.head_show("h1", "Test image show")

image = np.random.randint(0, 256, (256, 256, 3), dtype=np.uint8)

webcv.imshow("image", image)
webcv.imshow("resize using webcv", webcv.resize(image, (512, 512)))

# response in 30 seconds
webcv.waitKey(30000)

webcv.head_show("h1", "Test table show")
webcv.table_show("versions", [
    ["python", "opencv", "webcv"],
    [f"version {'.'.join(str(v) for v in sys.version_info)}", cv.__version__, webcv.__version__],
    ])

webcv.waitKey()

By running the code above, your terminal will display something like:

#####################################################################
#                                                                   #
#   The server is running at: http://my-server-ip:4732              #
#                                                                   #
#####################################################################
 * Serving Quart app 'webcv'
 * Environment: production
 * Please use an ASGI server (e.g. Hypercorn) directly in production
 * Debug mode: False
 * Running on http://0.0.0.0:4732 (CTRL + C to quit)

Copy paste the address into your browser to view (you may need ssh forward if you are using a remote server):

screenshot

Acknowledgement

The project was inspired by a Megvii tool.

License

MIT License

Release files for webcv 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for webcv 1.0.3
File Size Uploaded
webcv-1.0.3.tar.gz 7.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for webcv 1.0.3
File Interpreter ABI Platform
webcv-1.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 15.4 kB

Release files / webcv-1.0.3.tar.gz

Download URL webcv-1.0.3.tar.gz
Size 7.8 kB
Tags Source
SHA-256 checksum
How to use checksums
5c0f8d9c81cdec5257db29830a68d11e154d5d03ef396d0b75c4c5d0757cdab3
BLAKE2b-256 checksum
How to use checksums
684d25b85f8f4b0297ed43a664d39a7a05f5a82547db723f64946876d9515774
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

Release files / webcv-1.0.3-py3-none-any.whl

Download URL webcv-1.0.3-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f02f98003e1729e1f94f7b642b2a7fd6b9940b9beb4b88f656a8ecd98b2a0e69
BLAKE2b-256 checksum
How to use checksums
c1daffa92f83c23f2251c6e541af32655eca49370645a6c4da08aaf927f56267
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page