Skip to main content

app

Version: 19.8.0

Provides an AbstractKernel base class, command resolvers, typed response objects, and a service-container mixin for building structured Python CLI applications

Table of Contents

Basic Usage

from wexample_helpers.decorator.base_class import base_class

from wexample_app.common.abstract_kernel import AbstractKernel
from wexample_app.common.mixins.command_line_kernel import CommandLineKernel
from wexample_app.common.mixins.command_runner_kernel import CommandRunnerKernel

@base_class
class MyApp(CommandRunnerKernel, CommandLineKernel, AbstractKernel):
    pass

my_app = MyApp()

Additional Examples

Advanced Usage

from app import AdvancedFeature

# Advanced example
feature = AdvancedFeature(config={'option': 'value'})
result = feature.execute()

More examples can be found in the examples/ directory of the repository.

Installation

pip install app

Introduction

app provides essential base classes that facilitate quick development of simple, well-structured CLI programs.

Quickstart

Get started with app in seconds:

# Your first example with app
from app import YourClass

# Initialize and use
instance = YourClass()
instance.run()

This package requires Python >=3.10.

Installation

pip install wexample-app

Requires Python >=3.10.

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%.

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

Metadata

Release files for wexample-app 19.8.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 wexample-app 19.8.0
File Size Uploaded Provenance Actions
wexample_app-19.8.0.tar.gz 42.8 kB Without provenance Details for wexample_app-19.8.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for wexample-app 19.8.0
File Interpreter ABI Platform Actions
wexample_app-19.8.0-py3-none-any.whl Python 3 none any Details for wexample_app-19.8.0-py3-none-any.whl

Total release size: 125.2 kB

Release files / wexample_app-19.8.0.tar.gz

Download URL wexample_app-19.8.0.tar.gz
Size 42.8 kB
Tags Source
SHA-256 checksum
How to use checksums
698c540c2880e1f379e6fd1ef32a38687e7be21eea33865429c5752962a82176
BLAKE2b-256 checksum
How to use checksums
8acb9a881ba92eeccea72ccae550ff317473972a8ce0bab4c4932bd5e12a7cb2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.29.3 CPython/3.12.3 Linux/6.1.0-37-amd64

Release files / wexample_app-19.8.0-py3-none-any.whl

Download URL wexample_app-19.8.0-py3-none-any.whl
Size 82.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c6cdeda64c6886d97ce4ab1abe8badcfdb2cfd837be851db5bd155515a6226e3
BLAKE2b-256 checksum
How to use checksums
3ce305e9b8073daf9ee1e310bdd33ccb1ea934b2e365199a186ce9d56e783c2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.29.3 CPython/3.12.3 Linux/6.1.0-37-amd64

Security for wexample-app 19.8.0

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.

Release history Release notifications | RSS feed

This release

19.8.0 This release

2 release files No provenance

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