Skip to main content

Helpers for building Python app or cli.

Project description

wexample-app

Version: 0.0.72

Helpers for building Python app or cli.

Table of Contents

Status & Compatibility

Maturity: Production-ready

Python Support: >=3.10

OS Support: Linux, macOS, Windows

Status: Actively maintained

Installation

pip install wexample-app

Quickstart

Get started with wexample-app in seconds:

# Your first example with wexample-app
from wexample-app import YourClass

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

This package requires Python >=3.10.

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

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.

Useful Links

Project details


Download files

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

Source Distribution

wexample_app-0.0.72.tar.gz (31.0 kB view details)

Uploaded Source

Built Distribution

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

wexample_app-0.0.72-py3-none-any.whl (62.6 kB view details)

Uploaded Python 3

File details

Details for the file wexample_app-0.0.72.tar.gz.

File metadata

  • Download URL: wexample_app-0.0.72.tar.gz
  • Upload date:
  • Size: 31.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.25.9 CPython/3.12.3 Linux/6.8.0-101-generic

File hashes

Hashes for wexample_app-0.0.72.tar.gz
Algorithm Hash digest
SHA256 1f995ea1da8839497c50c601a5f742c4e05cd48e5ca0c67c8dd83d669501efd8
MD5 b632ecafe86c8e332f62a6e8a589406d
BLAKE2b-256 f22ecba5de42822a162cf288106b0f4c3ce832e857cbfd4cce1302a0a5f4b80b

See more details on using hashes here.

File details

Details for the file wexample_app-0.0.72-py3-none-any.whl.

File metadata

  • Download URL: wexample_app-0.0.72-py3-none-any.whl
  • Upload date:
  • Size: 62.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.25.9 CPython/3.12.3 Linux/6.8.0-101-generic

File hashes

Hashes for wexample_app-0.0.72-py3-none-any.whl
Algorithm Hash digest
SHA256 ebaa987beee11f74c506ea959a7e038f093229babaff0c8dadcb7bd7d627eced
MD5 c5724ba243d4fa8327996a3f3619c519
BLAKE2b-256 1d7c7c8446b2969178a33062a88affb4c77e423c66873d049fdf3bda5d5b49ad

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