
This document provides a complete technical reference for all public modules, classes, and methods available in Jarbin-ToolKit and its sub-modules.
Root package exposing all core modules and high-level API shortcuts.
IS_TTY: bool
Indicates if stdout is attached to a TTY.
OS: str
Operating system name (from platform.system()).
TERM: str
Terminal type (from environment variable).
get_info() -> dict[str, Any]Returns toolkit metadata.
from jarbin_toolkit import get_info
info = get_info()
print(info["version"])
benchmark(function: Callable, *args, **kwargs) -> tuple[Optional[Any], float, Optional[Exception]]Benchmarks a function call.
(result, elapsed_time_seconds)from jarbin_toolkit import benchmark
def slow():
return sum(range(1000000))
result, elapsed = benchmark(slow)
print(result, elapsed)
fail(message: str = "an error occurred") -> NoneRaises a jarbin_toolkit.Error.Error.
from jarbin_toolkit import fail
fail("Critical failure")
text(*args) -> Console.Text.TextCreates a Text object from given arguments.
from jarbin_toolkit import text
t = text("Hello", "World")
print(t.bold())
High-level direct bindings for faster access.
sleep → Time.Time.waitpause → Time.Time.pauseprintinputflushstdinstdoutstderrcriticerrorwarningvaliddebuginfoboldunderlinecolorupdownleftrightclearclear_linejarbin_toolkit.Action
Provides structured execution wrappers for callable objects.
ActionWraps a callable function and allows deferred execution.
Action(callable_obj: Callable, *args, **kwargs)
callable_obj — Function or callable to execute*args — Positional arguments passed to callable**kwargs — Keyword arguments passed to callable__call__()Executes the wrapped callable.
from jarbin_toolkit import Action
action = Action.Action("show hello", print, "Hello")
action()
__repr__()Returns a debug representation of the action.
ActionsContainer for multiple Action objects.
Actions()
+ (Add Action)Adds an Action to the collection.
from jarbin_toolkit import Action
actions = Action.Actions()
actions += Action.Action("show A", print, "A")
actions()
__call__()Executes all stored actions sequentially.
__len__()Returns number of stored actions.
__getitem__(index)Returns action at given index.
jarbin_toolkit.Config
INI configuration management with typed accessors.
ConfigConfig(path: str, data: dict | None = None, file_name: str = "config.ini")
path — Directory pathdata — Optional initial configuration dictionaryfile_name — Configuration filenameget(section: str, key: str) -> strReturns raw string value.
get_int(section: str, key: str) -> intReturns value as integer.
get_float(section: str, key: str) -> floatReturns value as float.
get_bool(section: str, key: str) -> boolReturns value as boolean.
set(section: str, key: str, value: Any)Sets configuration value.
delete()Deletes configuration file from disk.
from jarbin_toolkit import Config
cfg = Config("./", data={"App" : {"debug" : False}})
cfg.set("App", "debug", True)
debug = cfg.get_bool("App", "debug")
print(debug, type(debug))
jarbin_toolkit.Error
Structured error system with optional file/line linking.
ErrorError(message: str, link: tuple[str, int] | None = None)
message — Error messagelink — Optional (file, line) tupleErrorLaunchErrorImportErrorLogErrorConfigErrorSettingErrorTypeErrorValueAll inherit from Error.
from jarbin_toolkit import Error
raise Error.ErrorConfig("Invalid section", link=("config.ini", 42))
jarbin_toolkit.Log
Structured logging system supporting .jar-log and JSON formats.
LogLog(path: str, file_name: str = "log", format: str = "jar-log")
path — Directory pathfile_name — Log filename (without extension)format — "jar-log" or "json"log(level: str, title: str, message: str)Writes structured log entry.
comment(message: str)Writes comment line.
str_filtered(levels: list[str]) -> strReturns filtered log entries.
close(delete: bool = False)Closes file. Deletes if delete=True.
from jarbin_toolkit import Log
log = Log("./", "app")
log.log("INFO", "Start", "Application started")
log.close()
print(log)
jarbin_toolkit.Time
Precise timing utilities.
StopWatchStopWatch(start: bool = False)
start()Starts timer.
stop()Stops timer.
reset()Resets timer.
elapsed() -> floatReturns elapsed seconds.
==<><=>=TimeStatic time utilities.
wait(seconds: float) -> floatWaits exact duration and returns elapsed time.
pause(message: str) -> floatPauses execution until input.
from jarbin_toolkit import Time
watch = Time.StopWatch(True)
Time.Time.wait(2)
print(watch.elapsed())
jarbin_toolkit.Console
Advanced terminal rendering system.
AnimationANSICursorLineTextSettingConsole.print(*args, **kwargs)Enhanced print with terminal control.
Provides spinners and progress bars.
ProgressBarProgressBar(total: int)
update(value: int)Updates progress.
render() -> strReturns formatted progress string.
ANSI escape sequence utilities.
Common features:
Cursor manipulation utilities:
Line management:
Text formatting utilities.
Example:
from jarbin_toolkit import Console
Text = Console.Text.Text
print(Text.bold("Hello"))
my_text = Text("World")
print(my_text.underline())
Console environment configuration and internal settings management.
| Module | Status | Stability |
|---|---|---|
| Action | Released | Stable |
| Config | Released | Stable |
| Error | Released | Stable |
| Log | Released | Stable |
| Time | Released | Stable |
| Console | Released | Stable |
Jarbin-ToolKit is licensed under GNU GPL (2026).
Last update : API Reference — 2026/02/12