dynamicWebsite v1.4.4
pip install dynamicWebsite --upgrade
A simple way to host web server bundled with websocket to send and receive live data, from client to server, and pass live HTML changes from server to client without having to refresh the page."
To install:
pip install dynamicWebsite --upgrade
pip3 install dynamicWebsite --upgrade
python -m pip install dynamicWebsite --upgrade
python3 -m pip install dynamicWebsite --upgrade
Using this program is as simple as:
from dynamicWebsite import *
def process_form(viewerObj: BaseViewer, form: dict):
if form.get("PURPOSE") == "SHOW_IMAGE1":
initial = f'''<img src="" alt="IMG1"></img>'''
viewerObj.queueTurboAction(initial, "mainDiv", turboApp.methods.update)
elif form.get("PURPOSE") == "SHOW_IMAGE2":
initial = f'''<img src="" alt="IMG2"></img>'''
viewerObj.queueTurboAction(initial, "mainDiv", turboApp.methods.update)
def newVisitor(viewerObj: BaseViewer):
initial = f'''
<form onsubmit="return submit_ws(this)">
{viewerObj.addCSRF("SHOW_IMAGE1")}
<input type="text" name="username"><br>
<input type="password" name="password"><br>
<input type="file" name="ball" multiple><br>
<button type="submit">Search</button>
</form>
'''
viewerObj.queueTurboAction(initial, "mainDiv", turboApp.methods.update)
def visitorLeft(viewerObj: BaseViewer):
print(f"Visitor Left: {viewerObj.viewerID}")
extraHeads = ""
fernetKey = 'JJafcmKx6WRzZKhC8THl7tfXce2BVdYEntGHPJNFwSU='
bodyBase = """<body><div id="mainDiv"></div></body>"""
title = "Song Player"
resetOnDisconnect = False
baseApp, turboApp = createApps(process_form, newVisitor, visitorLeft, "Song Player", "/", fernetKey, extraHeads, bodyBase, title, resetOnDisconnect)
baseApp.run("0.0.0.0", 5000)
Future implementations:
- Adding ability to add classes and other HTML arguments to elements created
- Adding templates for various uses
This project is always open to suggestions and feature requests.
Metadata
Release files for dynamicWebsite 1.4.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dynamicwebsite-1.4.4.tar.gz | 11.4 kB | Without provenance | Details for dynamicwebsite-1.4.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dynamicWebsite-1.4.4-py3-none-any.whl | Python 3 | none | any | Details for dynamicWebsite-1.4.4-py3-none-any.whl |
Total release size: 22.6 kB
Release files / dynamicwebsite-1.4.4.tar.gz
| Download URL | dynamicwebsite-1.4.4.tar.gz |
|---|---|
| Size | 11.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7afa1dd73a106298f4e9da20a9703881e07f6d5291dfcb452ee65d63d6c445e1
|
|
BLAKE2b-256 checksum How to use checksums |
eed6efcd6c4208dc5d80b352015f701e7393a870a083f323bd48d52d9fed5e52
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.20
|
Release files / dynamicWebsite-1.4.4-py3-none-any.whl
| Download URL | dynamicWebsite-1.4.4-py3-none-any.whl |
|---|---|
| Size | 11.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
82255c3957a5fd28008ad84a2b517f4131ef37370e00be7d20449cd83d06a5de
|
|
BLAKE2b-256 checksum How to use checksums |
2c7c94d6923a1135360fdd528ad7dc19411a7ce58badbb102710cde1637779b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.20
|
Security for dynamicWebsite 1.4.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.