Skip to main content

Build HTML pages in Python — simple, readable, and beginner-friendly.

Project description

JUSU

JUSU is a tiny Python library to build HTML pages using a simple, readable plain-English style API. It is made for beginners, educators, and quick prototyping.

Quick usage:

from JUSU import Div, H1, P, Button, Img

page = Div(
	H1("Welcome to JUSU"),
	P("A tiny HTML builder."),
	Button("Click me", onclick="alert('Hello')", cls="btn"),
	Img(src="https://via.placeholder.com/150", alt="demo"),
	cls="container"
)
page.render_to_file("jusu_demo.html")

Run tests:

python -m pytest

Install:

pip install -e .

License: MIT

Course: A beginner-friendly course (text + interactive notebooks) is available in the course/ directory — authored by Francis Jusu.

Bundling & CLI

  • Tag.bundle(...) / Tag.bundle_export(...) — produce an HTML file and CSS file (and optionally a ZIP archive) for a component.
  • jusu bundle (CLI) — bundle a component by import path (see docs/bundling.md).

NPM assets

A minimal npm package jusu-assets is available in this repository (under package_assets/) containing optional CSS and tiny JS helpers. See docs/npm.md for instructions on running a local dry-run and publishing to npm.

Publish to TestPyPI (recommended first):

  1. Create an account on https://test.pypi.org/ and generate an API token.
  2. Set the API token as environment variables, for example (Powershell):
$Env:TWINE_USERNAME = "__token__"
$Env:TWINE_PASSWORD = "pypi-AgENdGVzdC..."
  1. Build and upload to TestPyPI:
python -m build -o dist
python -m twine check dist/*
python -m twine upload --repository testpypi dist/*

Publish to PyPI (after verifying TestPyPI):

python -m twine upload dist/*

If you prefer to specify the username and token directly instead of environment variables, pass --username and --password to twine upload, but environment variables are more secure.

JUSU

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

jusu-0.1.1.tar.gz (25.0 kB view details)

Uploaded Source

Built Distribution

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

jusu-0.1.1-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jusu-0.1.1.tar.gz
  • Upload date:
  • Size: 25.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for jusu-0.1.1.tar.gz
Algorithm Hash digest
SHA256 75890582c718b98682c33c8a7c37bf93223cf6ae903147b090a0489fe73aaca4
MD5 4e6bdf400a9fd6aabaaf51068c003dcd
BLAKE2b-256 c1686a6201f4d541b993622c2b60a7ea74c8320e67eba31086672c7844622072

See more details on using hashes here.

File details

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

File metadata

  • Download URL: jusu-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for jusu-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d8fb15b777dc553df1fcca0cadeefa0c3b2a4ba83041dd8900eb29a9baa81d2b
MD5 f7d7436cb933ffe131d26ba98cc78da6
BLAKE2b-256 4e1baa65936d282d63bf6cc219ac9a1e64b4098d03e5ff614e4a471fd5f93bd2

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