html framework
Project description
weba
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
- Github repository: https://github.com/cj/weba/
- Documentation https://weba.cj.io/
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file weba-0.2.32.tar.gz.
File metadata
- Download URL: weba-0.2.32.tar.gz
- Upload date:
- Size: 38.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8758ca6639acbc89b0de15a842fc34baf2eebeaa60c7dff3a4292b73bbfa6d2
|
|
| MD5 |
464c42804659113ddfd06aae8888d30b
|
|
| BLAKE2b-256 |
7761d228defeaa4739c337e3a874948f7e8a8021025c8a4de58431f23a6c5970
|
File details
Details for the file weba-0.2.32-py3-none-any.whl.
File metadata
- Download URL: weba-0.2.32-py3-none-any.whl
- Upload date:
- Size: 21.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a8593e7bb3ac408d11b9212efc40a99c8126b95cdd536977c1c0a398a8b01ed
|
|
| MD5 |
47866e820e5f9918b9068be0c8a3bed7
|
|
| BLAKE2b-256 |
3933b1f9d7b10704e599b37f8047e1d543cf78bc05a2821434d59c2363e9d384
|