Dev Tools is a collection of utility tools for Python developers — logging, decorators, debugging, progress bars, a markdown link checker, and an AST-based code map generator.
Project description
Bosos Dev Tools
Bosos Dev Tools is a collection of utility tools for Python developers, designed to simplify debugging, logging, and monitoring tasks. This package includes custom logging handlers, decorators for measuring execution time, a progress bar utility, a markdown link checker, and an AST-based code map generator.
Features
- Custom Logging Handlers: Log messages to various destinations, including databases, with customizable formats.
- Timing Decorators: Easily measure the execution time of your functions with minimal code changes.
- Progress Bar Utility: Visualize the progress of long-running operations in the console.
- Debug Tools: Check if debug or timing modes are enabled via environment variables.
- Markdown Link Checker: Scan markdown files for broken internal links — available as a library and a CLI tool.
- Code Map Generator: Generate AST-based documentation artifacts (symbol index, dependency graph, entry points, call graph) for any Python package.
Installation
You can install the package via pip:
pip install bosos-dev-tools
Usage
Custom Logging Handler
The LogDBHandler allows you to log messages directly to a database.
import logging
from dev_tools.custom_handlers import LogDBHandler
logger = logging.getLogger('test_logger')
db_handler = LogDBHandler(db_table='test_table')
logger.addHandler(db_handler)
logger.setLevel(logging.INFO)
logger.info('This is a test log message.')
Timing Decorator
Use the timing_decorator to measure the execution time of functions.
from dev_tools.custom_decorators import timing_decorator
@timing_decorator
def example_function():
for i in range(1000000):
pass
example_function()
Progress Bar
Visualize the progress of long-running iterations in the console.
from dev_tools.progress_bar import progress_bar
for item in progress_bar(range(10)):
pass
Debug Tools
Check if debug or timing modes are enabled via environment variables.
Use the logger_setup to set up your logging settings at the beginning of the script.
from dev_tools.debug_tools import is_debug_on, is_timing_on
print('Is debug on:', is_debug_on())
print('Is timing on:', is_timing_on())
from dev_tools.logger_settings import logger_setup
def main():
logger_setup()
if __name__ == '__main__':
main()
Log files are written to a structured folder hierarchy:
logs/
2026/
03/
02/
2026-03-02T062351.log
The folder path is controlled by environment variables:
| Variable | Default | Description |
|---|---|---|
LOGGER_PATH |
./logs |
Base log directory |
LOGGER_DAY_SPECIFIC |
False |
Add a day subfolder (zero-padded) |
LOGGER_SCRIPT_FOLDERS |
False |
Add a script-name subfolder before the year |
LOGGER_DATABASE |
False |
Also log to a database via LogDBHandler |
Markdown Link Checker
Scan markdown files for broken internal links. Available as a library or a CLI tool.
As a library:
from dev_tools.md_link_checker import scan_all
from pathlib import Path
result = scan_all(Path("."))
for r in result.results:
if r.status == "broken":
print(f"{r.source_file}:{r.line_number} -> {r.target} ({r.reason})")
As a CLI:
# Installed console script
md-link-checker --verbose
# Or run as a module
python -m dev_tools.md_link_checker --no-anchors --json
Code Map Generator
Generate AST-based documentation for a Python package — symbol index, dependency graph, entry points, and call graph.
As a library:
from pathlib import Path
from dev_tools.codemap_generator import CodeMapGenerator
gen = CodeMapGenerator(src_root=Path("src"), package_name="my_package")
gen.analyze()
gen.write_outputs(output_dir=Path("docs"))
As a CLI:
# Installed console script
codemap-generator --package my_package
# Or run as a module
python -m dev_tools.codemap_generator --package my_package --output-dir docs
License
This project is licensed under the MIT License. See the LICENSE file for more details.
Links
- Source Code: GitHub Repository
- Issue Tracker: GitHub Issues
- Changelog: CHANGELOG.md
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bosos_dev_tools-0.3.3.tar.gz.
File metadata
- Download URL: bosos_dev_tools-0.3.3.tar.gz
- Upload date:
- Size: 41.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91d4452f2cc95c957f9d9040f251f4cb503825b6acb4d82ae624a6812ec35ad7
|
|
| MD5 |
77f87b92fc4f1a06049412ae2810447e
|
|
| BLAKE2b-256 |
2d852371411b2155b235c69fcd7c88552917d2a3987cdf6bcf94997a6a36f19a
|
File details
Details for the file bosos_dev_tools-0.3.3-py3-none-any.whl.
File metadata
- Download URL: bosos_dev_tools-0.3.3-py3-none-any.whl
- Upload date:
- Size: 49.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
809c0b2d19ff7c5b7308415f0089180a33854b404992add3a451d332d0e90d5b
|
|
| MD5 |
25720a93929ea67949c14a09cc0d10da
|
|
| BLAKE2b-256 |
29cce2774a6ae6acc5b9eff0fbf41bf31b738658038d6644b9ce3f4533b687ed
|