wex_addon_dev_css
Version: 6.0.76
wex_addon_dev_css registers a CssAddonManager — a named subclass of AbstractAddonManager — into the wex CLI kernel, making it the entry point for CSS development tooling within the wex addon ecosystem. It carries no commands of its own; its role is to give the kernel a named CSS addon slot that other packages and addons can target. It is intended for developers working inside the wex ecosystem who need CSS tooling exposed through the CLI.
Table of Contents
- Installation
- Quickstart
- Tests
- Architecture
- Integration in the Suite
- Dependencies
- Versioning & Compatibility Policy
- License
- About us
- Known Limitations & Roadmap
- Status & Compatibility
- Useful Links
- Migration Notes
Installation
pip install wexample-wex-addon-dev-css
Requires Python >=3.10.
Quickstart
Install the package:
pip install wexample-wex-addon-dev-css
The public entry point is CssAddonManager, defined in src/wexample_wex_addon_dev_css/css_addon_manager.py:
from wexample_wex_addon_dev_css.css_addon_manager import CssAddonManager
Pass it to the kernel's setup() call to register the CSS addon slot:
from wexample_wex_core.common.kernel import Kernel
kernel = Kernel()
kernel.setup(addons=[CssAddonManager])
After setup() returns, the kernel holds a css addon entry (the name is derived from the class by stripping the AddonManager suffix). Other packages that target the CSS slot can then resolve it via kernel.get_addons()["css"]. The manager itself carries no commands; its presence in the addon list is the registration.
Tests
This project uses pytest for testing and pytest-cov for code coverage analysis.
Installation
First, install the required testing dependencies:
.venv/bin/python -m pip install pytest pytest-cov
Basic Usage
Run all tests with coverage:
.venv/bin/python -m pytest --cov --cov-report=html
Common Commands
# Run tests with coverage for a specific module
.venv/bin/python -m pytest --cov=your_module
# Show which lines are not covered
.venv/bin/python -m pytest --cov=your_module --cov-report=term-missing
# Generate an HTML coverage report
.venv/bin/python -m pytest --cov=your_module --cov-report=html
# Combine terminal and HTML reports
.venv/bin/python -m pytest --cov=your_module --cov-report=term-missing --cov-report=html
# Run specific test file with coverage
.venv/bin/python -m pytest tests/test_file.py --cov=your_module --cov-report=term-missing
Viewing HTML Reports
After generating an HTML report, open htmlcov/index.html in your browser to view detailed line-by-line coverage information.
Coverage Threshold
To enforce a minimum coverage percentage:
.venv/bin/python -m pytest --cov=your_module --cov-fail-under=80
This will cause the test suite to fail if coverage drops below 80%.
Architecture
The package contains one Python module under src/wexample_wex_addon_dev_css/. Its entire public surface is CssAddonManager, defined in src/wexample_wex_addon_dev_css/css_addon_manager.py.
Parts
CssAddonManager subclasses AbstractAddonManager from wexample_wex_core and adds nothing — its body is pass. All behaviour comes from the base class.
AbstractAddonManager (in wexample-wex-core) carries the registration logic. It inherits from:
AbstractKernelChild— gives the instance a reference to the kernel that owns it.HasSnakeShortClassNameClassMixin— derives the addon slot name by stripping theAddonManagersuffix from the class name and snake-casing the result.CssAddonManager→Css→css.WithWorkdirMixin— sets the addon's workdir to the directory of the class file during__attrs_post_init__.HasTwoStepInit— enforces the two-phaseattrsinitialisation pattern the kernel uses for all its children.
The base class exposes hook methods (get_command_resolver_classes, get_middlewares_classes, get_step_guard_classes, get_workdir_types, etc.) that a richer addon would override. CssAddonManager inherits all of them and returns their defaults (empty lists/dicts).
Registration path
- A caller constructs a kernel and passes
CssAddonManagerin theaddonslist tokernel.setup(). - The kernel instantiates the class, triggering
__attrs_post_init__, which calls_init_workdirwith the directory containing src/wexample_wex_addon_dev_css/css_addon_manager.py as the entrypoint path. - The kernel indexes the instance under the key
css(the result ofCssAddonManager.get_name()). - Any downstream package that needs the CSS slot calls
kernel.get_addons()["css"]to retrieve the manager.
The package itself issues no CLI commands and registers no resolvers. Its only job is to occupy the css slot so that other packages in the ecosystem have a stable, named target to extend or query.
Package layout
src/
└── wexample_wex_addon_dev_css/
├── __init__.py # empty
├── py.typed # PEP 561 marker
└── css_addon_manager.py # CssAddonManager
The build backend is pdm-backend. pyproject.toml declares one runtime dependency group: wexample-wex-addon-app, which pulls in the wex-core base classes; plus attrs and cattrs for the attrs-based init pattern.
Integration in the Suite
This package is part of the Wexample Suite — a collection of high-quality, modular tools designed to work seamlessly together across multiple languages and environments.
Related Packages
The suite includes packages for configuration management, file handling, prompts, and more. Each package can be used independently or as part of the integrated suite.
Visit the Wexample Suite documentation for the complete package ecosystem.
Dependencies
- attrs: >=23.1.0
- cattrs: >=23.1.0
- wexample-wex-addon-app: >=31.1.0
Versioning & Compatibility Policy
Wexample packages follow Semantic Versioning (SemVer):
- MAJOR: Breaking changes
- MINOR: New features, backward compatible
- PATCH: Bug fixes, backward compatible
We maintain backward compatibility within major versions and provide clear migration guides for breaking changes.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Free to use in both personal and commercial projects.
About us
Wexample stands as a cornerstone of the digital ecosystem — a collective of seasoned engineers, researchers, and creators driven by a relentless pursuit of technological excellence. More than a media platform, it has grown into a vibrant community where innovation meets craftsmanship, and where every line of code reflects a commitment to clarity, durability, and shared intelligence.
This packages suite embodies this spirit. Trusted by professionals and enthusiasts alike, it delivers a consistent, high-quality foundation for modern development — open, elegant, and battle-tested. Its reputation is built on years of collaboration, refinement, and rigorous attention to detail, making it a natural choice for those who demand both robustness and beauty in their tools.
Wexample cultivates a culture of mastery. Each package, each contribution carries the mark of a community that values precision, ethics, and innovation — a community proud to shape the future of digital craftsmanship.
Known Limitations & Roadmap
Current limitations and planned features are tracked in the GitHub issues.
See the project roadmap for upcoming features and improvements.
Status & Compatibility
Maturity: Production-ready
Python Support: >=3.10
OS Support: Linux, macOS, Windows
Status: Actively maintained
Useful Links
- Homepage: https://github.com/wexample/python-wex-addon-dev-css
- Documentation: docs.wexample.com
- Issue Tracker: https://github.com/wexample/python-wex-addon-dev-css/issues
- Discussions: https://github.com/wexample/python-wex-addon-dev-css/discussions
- PyPI: pypi.org/project/wexample-wex-addon-dev-css
Migration Notes
When upgrading between major versions, refer to the migration guides in the documentation.
Breaking changes are clearly documented with upgrade paths and examples.
Metadata
Release files for wexample-wex-addon-dev-css 6.0.76
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| wexample_wex_addon_dev_css-6.0.76.tar.gz | 5.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| wexample_wex_addon_dev_css-6.0.76-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.6 kB
Release files / wexample_wex_addon_dev_css-6.0.76.tar.gz
| Download URL | wexample_wex_addon_dev_css-6.0.76.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4cfee6c880b1b28b599daa1609d1fabf0fff18b4bfef3ac4e79de55bd8849381
|
|
BLAKE2b-256 checksum How to use checksums |
308939914d8a360aeea24a520634137860df07b4b276d3fd3332b244c5bb2575
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
pdm/2.25.9 CPython/3.12.3 Linux/6.8.0-139-generic
|
Release files / wexample_wex_addon_dev_css-6.0.76-py3-none-any.whl
| Download URL | wexample_wex_addon_dev_css-6.0.76-py3-none-any.whl |
|---|---|
| Size | 5.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b721c5d25f850de8d650b2abebd0adc24b354979487c0bb866f1656493462abf
|
|
BLAKE2b-256 checksum How to use checksums |
e2251db80c7cde6593a4978d3453565cc081c5846325d692363ced32a3c16971
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
pdm/2.25.9 CPython/3.12.3 Linux/6.8.0-139-generic
|