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.2

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.2
File Size Uploaded
justin_utils-0.6.2.tar.gz 39.0 kB Details

Built distribution (wheel)

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

Total release size: 63.8 kB

Release files / justin_utils-0.6.2.tar.gz

Download URL justin_utils-0.6.2.tar.gz
Size 39.0 kB
Tags Source
SHA-256 checksum
How to use checksums
ac353cd9fff00de01af850776c8867e3697d606c9ef44323c01f2d8d2fa0412f
BLAKE2b-256 checksum
How to use checksums
9d1fdc77a299f7a398406099742ccc93dd7bc0fff572ce0247f9e7a67f84f876
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 14, 2026.

Transparency log

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

Download URL justin_utils-0.6.2-py3-none-any.whl
Size 24.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c9b23b0bba5396988c3a0be635cf1c4768b5d2c1873a62d20284ea9277a1e73a
BLAKE2b-256 checksum
How to use checksums
9699383cad51b54a56bdc7c6e5c99d0170c5b4766f64f997782f19cd02cff233
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 14, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.6.2 This release

2 release files

0.6.1

2 release files

0.6.0

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