Skip to main content

arin-log

A lightweight, cross-platform logging package for long-running pipelines. A virtual assistant for the user. A clean archive for the developer.


What is arin_log?

arin_log combines two roles in one package:

  1. A virtual assistant (Arin) who talks to the user on the console and keeps them informed about what the script is doing.
  2. A clean, technical log file that contains only the beacons: start, exception, exit. Meant for the developer who has to reconstruct later what happened.

The user sees a story. The developer sees a trail. That is the core.

Arin is not an AI. She is a voice — a smart logger with a character. This is a deliberate choice not to abuse the AI hype.


Installation

pip install arin-log

On first import, a folder dialog appears asking where you want to store your log files. The choice, together with the default colors, is saved in:

  • Windows: %APPDATA%\arin_log\config_log.json
  • Linux/macOS: ~/.arin_log/config_log.json

The dialog appears only once. On every next run, arin_log reads this file and skips the dialog.

If you want to change the log folder later:

from arin_log import change_folder
change_folder()

Quick example

from arin_log import log_start, log_notes, log_except, log_exit
from sys import _getframe

log_start("my_pipeline", logloc="pipeline")

try:
    log_notes("startup ; loading data", logloc="pipeline")
    # ... your work ...
    log_notes("success ; data loaded", logloc="pipeline")
except Exception:
    log_except(_getframe(), "data ; loading ; fail", logloc="pipeline")
    log_exit("my_pipeline", imp=False, logloc="pipeline")

log_exit("my_pipeline", imp=True, logloc="pipeline")

What the user sees on the console:

Arin : startup ; loading data
Arin : success ; data loaded
Arin my_pipeline ; 14:32:11 ; completed

What ends up in the log file:

26-10-04.pipeline.log

my_pipeline ; 14:32:11 ; running

startup ; loading data
success ; data loaded

my_pipeline ; 14:32:11 ; completed
------------------------------------------------------------

JSON helpers

arin_log ships with two JSON helpers, available directly from the package:

from arin_log import load_json, save_json

data = load_json("myfile.json")
save_json("myfile.json", data, indent=4)

load_json returns {} if the file is missing or corrupt. save_json returns True on success, False on failure.

These helpers come with arin_log because most modules already import the package — so they are available wherever you need them, without an extra dependency.


What makes arin_log different?

Aspect arin_log Loguru / stdlib / structlog
Context propagation One parameter logloc travels through the whole call chain; every submodule becomes part of the same log file LoggerAdapter, contextvars, or manual config
Console vs. log file Deliberately separated: console = everything (with Arin as a voice), log file = only the beacons Everything goes to the same handlers
Archive One log file per main module per day, with automatic section separation per subtask Scattered files or one big file
Arin as virtual assistant A character who guides the user, not a log-level prefix No equivalent
Exception notation module.function.linenumber ; time ; exception — compact and directly usable Full traceback or exc_info=True

Core USP: logloc + daily grouping per main module + separation of console and archive + Arin.


How it works

The package consists of four modules, each with a clear task:

  • logger.py — the heart: log_start, log_notes, log_except, log_exit, and the helpers.
  • folder.py — manages the config folder and the log folder.
  • console.py — console interaction: clear screen, menus.
  • utils.py — JSON helpers (load_json, save_json).

Configuration

  • log_cnfg.json ships with the package as a template: the default color words and color codes for the console.
  • config_log.json lives in %APPDATA%\arin_log\ (Windows) or ~/.arin_log/ (Linux/macOS). On first run it is created by copying the colors from log_cnfg.json and adding your chosen log folder.

To customize colors, edit config_log.json in the config folder above. Your changes survive pip install --upgrade arin-log, because the file is never touched by pip.


The log folder

arin_log stores its files in a folder of your choice. On first use, a folder dialog appears. The choice is saved in config_log.json (see Configuration), so it survives across sessions and is never overwritten by a pip install --upgrade.

If config_log.json is missing or corrupt, the dialog appears again — the package has no fallback folder. The user is expected to choose.


Requirements

  • Python 3.9 or higher

No external dependencies.


License

MIT — see LICENSE.


Status

Alpha (0.2.1). The core works. Tests are still in development.

Metadata

Release files for arin-log 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for arin-log 0.2.1
File Size Uploaded Provenance
arin_log-0.2.1.tar.gz 15.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for arin-log 0.2.1
File Interpreter ABI Platform
arin_log-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 29.6 kB

Release files / arin_log-0.2.1.tar.gz

Download URL arin_log-0.2.1.tar.gz
Size 15.0 kB
Tags Source
SHA-256 checksum
How to use checksums
59dd7d1d6e432ac5747eea81ffbdcc2e2e51a1ba39395aa18df4a84a10a9ec15
BLAKE2b-256 checksum
How to use checksums
f58a4ea86d8ccfab241a2a591ce70d90da8885fe79cf0ccab7fa2e8aac42e844
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Release files / arin_log-0.2.1-py3-none-any.whl

Download URL arin_log-0.2.1-py3-none-any.whl
Size 14.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c5828e7a0d14e22e6a4d3dc57c2f521fb7499e538cb972d3cce37caeed373bbe
BLAKE2b-256 checksum
How to use checksums
e91cc5fa19c691486a207fe525a35531e8d1fbb6fb90f2813c43e57b8d65d7ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Security for arin-log 0.2.1

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.

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