Skip to main content

TivelWeb

TivelWeb is a lightweight Python library for building responsive static websites without writing all the HTML and CSS yourself.

Install locally

cd tivelweb
python -m venv .venv
source .venv/bin/activate
pip install -e .

Build your first website

from tivelweb import Site, hero, section

site = Site("My Website", theme_color="#6c5ce7")
home = site.page("Home", description="My first Python website")
home.add(hero("Welcome", "This website was built using Python.", "Learn more", "#about"))
home.add(section("About", "TivelWeb generates fast static HTML."))
site.build()

Run the file, then preview the generated dist folder:

python app.py
tivelweb serve dist

Open http://127.0.0.1:8000.

Commands

tivelweb new mywebsite
cd mywebsite
python app.py
tivelweb serve dist

Features

  • Responsive pages and navigation
  • Hero, section, card, button, and image components
  • Multiple pages
  • Custom theme colors
  • Static asset copying
  • Built-in local preview server
  • No runtime dependencies
  • Built-in responsive news website template
  • Portfolio, business and blog templates
  • Ocean, sunset, forest, midnight and rose style presets
  • Online or local background images with adjustable overlays
  • One-command build and preview with Site.run() or serve=True

News website template

from tivelweb import create_news_site

site = create_news_site(
    name="Tivals News",
    output="news_website",
    theme_color="#d71920",
)
python app.py
tivelweb serve news_website

More templates

from tivelweb import create_portfolio_site, create_business_site, create_blog_site

create_portfolio_site(name="Tivalsdeveloper", style="midnight")
create_business_site(name="Tivals Digital", style="ocean")
create_blog_site(name="Tivals Blog", author="Lufuno", style="rose")

Style presets

from tivelweb import Site, style_preset, theme_color

site = Site("My Site", theme_color=theme_color("forest"))
home = site.page("Home")
home.add(style_preset("forest"))
site.build()

Background image and automatic preview

from tivelweb import create_portfolio_site

create_portfolio_site(
    name="Tivalsdeveloper",
    tagline="Building websites, libraries and AI tools.",
    style="midnight",
    background_image="https://example.com/background.jpg",
    serve=True,
)

Now this single command builds, serves and opens the website:

python portfolio.py

For a custom site, call site.run() instead of site.build():

site = Site("My Site", background_image="background.jpg")
site.page("Home")
site.run()

Test

python -m unittest discover -s tests

License

MIT

Metadata

Release files for tivelweb 0.4.0

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

Source distribution (sdist)

Source distribution for tivelweb 0.4.0
File Size Uploaded
tivelweb-0.4.0.tar.gz 11.4 kB Details

Built distribution (wheel)

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

Total release size: 22.9 kB

Release files / tivelweb-0.4.0.tar.gz

Download URL tivelweb-0.4.0.tar.gz
Size 11.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e9e2ac9274c57fec4d93f1f8d5083682198d71002251d72eabfd62abc3c466d7
BLAKE2b-256 checksum
How to use checksums
a000fb3a3183bb2e30b9b3b6a562e1ea6e06d0d22f89dd8fbd3670727b7e55d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 30, 2026.

Transparency log

Release files / tivelweb-0.4.0-py3-none-any.whl

Download URL tivelweb-0.4.0-py3-none-any.whl
Size 11.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
83914e3d44acb14c614f4b4b5ad939b40e4e5dd22fa3ca9d2f988526751cfdc8
BLAKE2b-256 checksum
How to use checksums
47ca52cff28f2bdca9fae27afca614937af075509df5f60d516434092df9e005
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 30, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

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