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/
Metadata
Release files for weba 0.2.32
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| weba-0.2.32.tar.gz | 38.8 kB | Without provenance | Details for weba-0.2.32.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| weba-0.2.32-py3-none-any.whl | Python 3 | none | any | Details for weba-0.2.32-py3-none-any.whl |
Total release size: 60.6 kB
Release files / weba-0.2.32.tar.gz
| Download URL | weba-0.2.32.tar.gz |
|---|---|
| Size | 38.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d8758ca6639acbc89b0de15a842fc34baf2eebeaa60c7dff3a4292b73bbfa6d2
|
|
BLAKE2b-256 checksum How to use checksums |
7761d228defeaa4739c337e3a874948f7e8a8021025c8a4de58431f23a6c5970
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.11
|
Release files / weba-0.2.32-py3-none-any.whl
| Download URL | weba-0.2.32-py3-none-any.whl |
|---|---|
| Size | 21.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1a8593e7bb3ac408d11b9212efc40a99c8126b95cdd536977c1c0a398a8b01ed
|
|
BLAKE2b-256 checksum How to use checksums |
3933b1f9d7b10704e599b37f8047e1d543cf78bc05a2821434d59c2363e9d384
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.11
|
Security for weba 0.2.32
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.