Skip to main content

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.

Project description

dynamicWebsite v1.3.0

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:


def process_form(viewerObj: BaseViewer, form: dict):
    if form is not None:
        print(f"[{viewerObj.viewerID}] sent: ", form)
    else:
        print("Disconnected: ", viewerObj.viewerID)

def newVisitor(viewerObj: BaseViewer):
    initial = f"""
    <h2>Submit Song Name</h2>
    <div id="searchform" class="container"></div>
    <div id="audioplayer" class="container"></div>    
    <div id="status_create"></div>
    <div id="debug" class="container"></div>
    """
    viewerObj.queueTurboAction(initial, "mainDiv", viewerObj.turboApp.methods.update)
    sendForm(viewerObj)
    
def visitorLeft(viewerObj: BaseViewer):
    print("Visitor Left")

extraHeads = ""
fernetKey = 'GNwHvssnLQVKYPZk0D_Amy9m3EeSvi6Y1FiHfTO8F48='
appName = "Song Player"
homePageRoute = "/song"
WSRoute = f"/song_ws"
title = "Song Player"
resetOnDisconnect = False
baseApp, turboApp = createApps(process_form, newVisitor, visitorLeft, appName, homePageRoute, WSRoute, fernetKey, extraHeads, title, resetOnDisconnect)

turboApp.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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dynamicwebsite-1.3.0.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dynamicWebsite-1.3.0-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file dynamicwebsite-1.3.0.tar.gz.

File metadata

  • Download URL: dynamicwebsite-1.3.0.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for dynamicwebsite-1.3.0.tar.gz
Algorithm Hash digest
SHA256 4969266cadff2e8ce3e21bc8e4b1c61db85a80442bbfb6e47ac9429fa9d78776
MD5 c1643b28f626438c5a8230449cf475af
BLAKE2b-256 9c54c5a8a759bc7eeaa156fe2414e500acab5e40fdea2ae5bac91fc6e0f22e74

See more details on using hashes here.

File details

Details for the file dynamicWebsite-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: dynamicWebsite-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for dynamicWebsite-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 641f7961d719151a090ce524c5d0e699cf873e19618238d2202c6d49c73bd639
MD5 76eee18abf6993bc7efb6bd263d7fe59
BLAKE2b-256 9b51421c0c28f59b94284a2c1b269679e706ab3e89a00b1d1e05013a180b308e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page