Skip to main content

justin_utils

Shared utility library for the Justin Python ecosystem. Provides reusable building blocks for filesystem operations, CLI tooling, functional sequences, EXIF handling, and more — designed to be installed as a lightweight dependency across multiple projects.

Requirements

Python 3.11+

Installation

pip install justin_utils

To install only specific modules and their dependencies, use extras:

pip install "justin_utils[filesystem]"
pip install "justin_utils[exif,sources]"

For development:

pip install -e ".[test]"

Linting and tests:

ruff check .
pytest

Linting and tests:

ruff check .
pytest

CLI tools

Two command-line utilities are installed as entry points:

parts — manages numbered folder structures (01.name, 02.name, …):

parts make <count>       create N numbered folders
parts renumber           renumber existing parts sequentially
parts offset <n>         shift all part indices by n

sf — moves files into a named subfolder:

sf <subfolder>

Modules

cli

Lightweight argparse wrapper: App, Command, Action, Parameter. Supports multi-action commands and typed parameters.

data

DataSize and DataSpeed with human-readable formatting (B/KB/MB/GB and per-second variants).

exif

EXIF metadata extraction via Pillow. Exif.from_path probes containers to reach the embedded image — RAF files carry a full-size JPEG preview, everything else is read directly — and returns None when the date can't be read. exif_sorted sorts a sequence of paths by date taken.

filesystem

File and Folder wrappers over pathlib.Path with move/copy/rename operations, cross-drive detection, and recursive tree handling. RelativeFileset preserves relative paths when moving groups of files.

joins

SQL-style join operations over arbitrary iterables: inner, left, right, full_outer.

json_migration

JsonMigrator applies versioned migrations to JSON objects in order, updating the stored version key after each step.

pylinq

Lazy Sequence wrapper with a LINQ-style API: filter, map, flat_map, group_by, distinct, take, skip, reduce, any, and terminal operations like to_list, to_dict, to_set.

singleton

Singleton abstract base class. Subclasses get a single cached instance via .instance().

sources

Photo source abstraction: groups raw files (NEF, RAF, ARW) with their XMP sidecar metadata, and JPEG/TIFF/DNG/HEIC files with embedded metadata. parse_sources returns a flat list of Source objects ready for sorting or moving.

testing

pytest plugin with the create_files fixture: builds a file tree from a nested dict (None — empty file, str/bytes — content, dict — folder). Install justin_utils[testing] and enable it in the root conftest.py with pytest_plugins = ["justin_utils.testing"].

time_formatter

format_time(delta) — formats a timedelta as a human-readable string ("X h", "Y m", "Z s").

transfer

TransferSpeedMeter tracks a rolling transfer speed over recent history. TransferTimeEstimator estimates remaining time given current speed and remaining size.

util

General-purpose functions: sequence operations (distinct, flatten_lazy, group_by, stride, first), date/time parsing, BFS traversal, user prompts (ask_for_permission, ask_for_choice), and keydefaultdict — a dict subclass with a key-dependent default factory.

Metadata

Release files for justin-utils 0.6.0

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

Source distribution (sdist)

Source distribution for justin-utils 0.6.0
File Size Uploaded
justin_utils-0.6.0.tar.gz 38.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for justin-utils 0.6.0
File Interpreter ABI Platform
justin_utils-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 62.5 kB

Release files / justin_utils-0.6.0.tar.gz

Download URL justin_utils-0.6.0.tar.gz
Size 38.0 kB
Tags Source
SHA-256 checksum
How to use checksums
6dd1cede2a2dbaaf3ebf76d6946d27ca691e71e4d816d66308d17910cce82492
BLAKE2b-256 checksum
How to use checksums
dc19ac5b2f3a1d755f8df2f09e85565d9772c092bf6a7b3f0b7fac5a710ab4db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.

Transparency log

Release files / justin_utils-0.6.0-py3-none-any.whl

Download URL justin_utils-0.6.0-py3-none-any.whl
Size 24.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
75381497f08ff5ac652a93452462454cd88736c3ca2d13fff4c74fda51630771
BLAKE2b-256 checksum
How to use checksums
dc064debcf48d453cffba5453613c5cacc0940a16ddc35ac72bb22b8d7f86a17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.

Transparency log

Release history Release notifications | RSS feed

0.6.2

2 release files

0.6.1

2 release files

This release

0.6.0 This release

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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