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.

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.4.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 justin-utils 0.4.1
File Size Uploaded
justin_utils-0.4.1.tar.gz 34.5 kB Details

Built distribution (wheel)

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

Total release size: 57.6 kB

Release files / justin_utils-0.4.1.tar.gz

Download URL justin_utils-0.4.1.tar.gz
Size 34.5 kB
Tags Source
SHA-256 checksum
How to use checksums
45cff9534e613fd675f20f3ab55f66cde7f2d68be9dc4d38555ec997f156c9d5
BLAKE2b-256 checksum
How to use checksums
7b466b4854dbcdc3068d575b9968a73734edbe38ef6b6904035a30c7986cb452
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 Sep 5, 2026.

Transparency log

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

Download URL justin_utils-0.4.1-py3-none-any.whl
Size 23.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5321c4a9b6d916dfb34e529ca58612cfcdea8bd4e1003028e7a1930883857044
BLAKE2b-256 checksum
How to use checksums
75b9ccc9333fea14ff13ff4a994f33450e594500bde7ae4c68963802a4ececf3
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 Sep 5, 2026.

Transparency log

Release history Release notifications | RSS feed

0.5.0

2 release files

This release

0.4.1 This release

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