Skip to main content

Web framework to generate web-based applications in pure python

Project description

RapidHTML

A PEP8-compliant, well documented and typehinted framework for creating web apps in a purely Pythonic way. Powered by Javacsript frameworks like HTMX, and with CSS built-in, write more Python and less of everything else.

Example

from rapidhtml import RapidHTML
from rapidhtml.tags import *

app = RapidHTML(
    html_head=[Link(rel="stylesheet", href="https://matcha.mizu.sh/matcha.css")]
)

async def clicked_callback():
    return "Clicked!"

@app.route('/')
async def homepage(request):
    return Html(
        Div(
            H1('Hello, world!'),
            Button('Click me', callback=clicked_callback, id='button'),
        )
    )

if __name__ == "__main__":
    app.serve()

This will serve the app at http://localhost:8000

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

rapidhtml-0.1.1.tar.gz (27.0 kB view details)

Uploaded Source

Built Distribution

rapidhtml-0.1.1-py3-none-any.whl (29.7 kB view details)

Uploaded Python 3

File details

Details for the file rapidhtml-0.1.1.tar.gz.

File metadata

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

File hashes

Hashes for rapidhtml-0.1.1.tar.gz
Algorithm Hash digest
SHA256 52de6af08bedee36d4f22de9c43add305ba465eb5eaba525eb698c33479e6a30
MD5 20824b61dbbff201033133bb729b2c2a
BLAKE2b-256 ee55e611b292608e8b9ee5ff92f30988df86d4a1c235da02ec08eae2ae9cbc24

See more details on using hashes here.

File details

Details for the file rapidhtml-0.1.1-py3-none-any.whl.

File metadata

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

File hashes

Hashes for rapidhtml-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4947c5311108ce3777967add91b3c73aff76ec93237decd6ed7082ed121972cf
MD5 0861bde49b2cba176d1996abed027001
BLAKE2b-256 74777d8fd0cb24a89eeb3d77485057dc33bd04f0b7bf4305f0d866b96d5c65b0

See more details on using hashes here.

Supported by

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