Skip to main content

html framework

Project description

weba

Release Build status codecov Commit activity License

Weba is a Python library for building web user interfaces using a declarative, component-based approach. It provides a clean API for creating HTML elements and components with proper context management and type safety. The library extends BeautifulSoup's functionality by adding a custom Tag class that supports modern web development patterns, including HTMX integration, class list manipulation, and comment-based selectors. It allows developers to create reusable UI components with proper isolation, supports both synchronous and asynchronous contexts, and handles attribute management (including JSON serialization) elegantly. The library emphasizes type safety and follows clean code practices, making it particularly suitable for building modern web applications in Python with a focus on maintainability and developer experience.

Configuration

The library supports the following environment variables for configuration:

  • WEBA_LRU_CACHE_SIZE: Controls caching of parsed HTML templates and file contents:
    • When set: Enables LRU caching with the specified maximum size
    • When not set: Disables caching, templates and files are re-read on every access

Example:

export WEBA_LRU_CACHE_SIZE=256  # Enable caching with max 256 entries
unset WEBA_LRU_CACHE_SIZE      # Disable caching completely

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

weba-0.2.30.tar.gz (31.7 kB view details)

Uploaded Source

Built Distribution

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

weba-0.2.30-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

Details for the file weba-0.2.30.tar.gz.

File metadata

  • Download URL: weba-0.2.30.tar.gz
  • Upload date:
  • Size: 31.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for weba-0.2.30.tar.gz
Algorithm Hash digest
SHA256 36e98f053ef36fa5b5fe290d016556341b2571bbdbd3e2315dc6d6ffb0d5fbd2
MD5 67ad33bc69265a13a77238904d454b24
BLAKE2b-256 317dc64053f1b1e5a14c70b2d74e61edb0514ef7acb4f997c99d8fa50cf5383a

See more details on using hashes here.

File details

Details for the file weba-0.2.30-py3-none-any.whl.

File metadata

  • Download URL: weba-0.2.30-py3-none-any.whl
  • Upload date:
  • Size: 18.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for weba-0.2.30-py3-none-any.whl
Algorithm Hash digest
SHA256 c662e77e78514b8fcd78e7a10e9fc36e50053289c361652b712de27698027267
MD5 d80077fd066f69e35dc6c699018de313
BLAKE2b-256 81473c211fe9e72043f7b95f3e0ede67f5f3f8a6b01afcba862797ecec434e62

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