Skip to main content

Small sets of classes for various operations.

Project description

JskToolBox

JskToolBox provides curated sets of Python classes that support system automation, networking, configuration handling, and Tkinter-based GUI development. The documentation in docs/ offers module-by-module guides; the sections below highlight the available references.

Development Rules

The project uses Poetry for development workflows. Run project tools through poetry run <command>.

Code Formatting and Class Layout

  • Format Python code with black via poetry run black .
  • Validate style with poetry run pycodestyle
  • Use full type annotations for methods, properties, and class-level constants
  • Prefer single quotes unless double quotes are required
  • Organize each class into ordered sections separated by 80-character markers such as # #[PUBLIC METHODS]####################################################################

Required class section order:

  1. CONSTANTS
  2. CONSTRUCTOR
  3. PUBLIC PROPERTIES
  4. PROTECTED PROPERTIES
  5. PRIVATE PROPERTIES
  6. PUBLIC METHODS
  7. PROTECTED METHODS
  8. PRIVATE METHODS
  9. STATIC/CLASS METHODS
  10. EOF as the single final marker of the module file

Methods and properties inside each section must be sorted alphabetically.

Versioning and Changelog

The project follows Semantic Versioning in X.Y.Z format.

  • MAJOR for breaking API changes
  • MINOR for backward-compatible features
  • PATCH for fixes, small improvements, and refactoring
  • Documentation-only changes do not require a version bump
  • Code changes must update both pyproject.toml and jsktoolbox/__init__.py

Project history is tracked in CHANGELOG.md. Changelog entries use the format <type>: <subject> with these types: feat, fix, docs, style, refactor, test, chore.

For BData dictionary keys, use ReadOnlyClass constants with the narrowest sensible scope:

  • __Keys for a single class
  • _Keys for a shared module scope
  • public NameKeys classes for project-wide reuse in easy-to-find public keys modules

Core Utilities

  • AttribTool – base classes that restrict dynamic attribute creation and manage declared fields
    AttribTool Readme
  • BaseTool – mixins for metadata reporting, data storage, logging, and threading used across the project
    BaseTool Readme
  • RaiseTool – helpers that standardise exception formatting and error reporting
    RaiseTool Readme
  • SystemTool – utilities for interacting with the host operating system
    SystemTool Readme

Configuration and Data

  • ConfigTool – parsers and helpers for working with configuration files
    ConfigTool Readme
  • DateTool – date/time conversions, validation, and formatting helpers
    DateTool Readme
  • StringTool – routines for text manipulation and sanitising
    StringTool Readme

Logging and Networking

Tkinter

  • TkTool – Tk mixins, layout helpers, clipboard adapters, and reusable widgets (excluding the unreliable _TkClip)
    TkTool Readme

API Documentation

Complete API reference documentation is available:

  • Generate Documentation: make docs or poetry run python generate_docs.py
  • HTML Documentation: Open docs_api/build/html/index.html after generation
  • Preferred Imports: PREFERRED_IMPORTS.md - Lazy import patterns
  • AI Agent Guide: AI_AGENT_GUIDE.md - Integration guide for AI agents
  • Code Examples: EXAMPLES_FOR_AI.md - Practical usage examples
  • Project Changelog: CHANGELOG.md - Versioned history of project changes
  • Module Index: API_INDEX.md - Quick reference of all modules
  • API Structure: api_structure.json - Machine-readable API structure

Lazy Imports (Important)

The library uses lazy imports for performance. Use the preferred shorter patterns:

# ✓ Preferred (lazy loading)
from jsktoolbox.configtool import Config
from jsktoolbox.logstool import LoggerClient

# ✗ Avoid (works but longer)
from jsktoolbox.configtool.main import Config
from jsktoolbox.logstool.logs import LoggerClient

Quick Start

# Install dependencies
poetry install

# Generate all documentation
make docs

# Or use the script directly
poetry run python generate_docs.py

# Open documentation in browser
make docs-open

Examples

Examples demonstrating selected modules can be found in:

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

jsktoolbox-1.2.3.tar.gz (109.5 kB view details)

Uploaded Source

Built Distribution

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

jsktoolbox-1.2.3-py3-none-any.whl (157.0 kB view details)

Uploaded Python 3

File details

Details for the file jsktoolbox-1.2.3.tar.gz.

File metadata

  • Download URL: jsktoolbox-1.2.3.tar.gz
  • Upload date:
  • Size: 109.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.14 Linux/6.4.0-150600.23.87-default

File hashes

Hashes for jsktoolbox-1.2.3.tar.gz
Algorithm Hash digest
SHA256 f774173a2cf29e85a140d4c8da31804c6ff2fcc5f03f004759c5e47c92e63d61
MD5 459968603ace52932a2493653f86cdd7
BLAKE2b-256 606087162b4d9d6a61892d6bd0505280e231781220099ec5a3492527bb6e3975

See more details on using hashes here.

File details

Details for the file jsktoolbox-1.2.3-py3-none-any.whl.

File metadata

  • Download URL: jsktoolbox-1.2.3-py3-none-any.whl
  • Upload date:
  • Size: 157.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.14 Linux/6.4.0-150600.23.87-default

File hashes

Hashes for jsktoolbox-1.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e9b773fadef6f78ad95ba6efc481fa9fe1647fe70fee570317efdc3ef759344d
MD5 eecc72e5b2388e0ee633cfbb9df3fadc
BLAKE2b-256 07ccfa0ea26ddee476e4aa315d9032744b9acc2a8ba7b73c5eb1a6caf501da62

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