Skip to main content

novus-pytils

PyPI version Python License: MIT CI

Small, dependable helpers for the things scripts do over and over: find and move files, zip and unzip, load a config, hash a download, print a table. Nine flat modules, no classes to learn, pathlib in and Path out.

pip install novus-pytils
pip install "novus-pytils[all]"   # adds audio (pydub) and image (Pillow) conversion

What's in it

Module For
files read, write, copy, move, back up, find, filter, and sync files and directories
formats which kind a file is (audio, image, video, text, archive) and listing by kind
convert audio and image format conversion by extension
archive zip archives: create, inspect, extract, add, remove
config YAML and JSON config files, dotted-key access, layered merging
lists flatten, chunk, group, partition, order-preserving set operations, statistics
hashing file and text digests, verify a download
validation path safety, filename sanitising, sizes, URLs, emails, JSON shape
console coloured status lines, tables, a progress bar, prompts

A taste

from pathlib import Path
from novus_pytils import files, formats, archive, config, hashing, console

# Every WAV under a folder, newest first, over 1 MB
wavs = formats.get_files("recordings", kind="audio", recursive=True)
big = files.filter_files_by_size(wavs, min_size=1 << 20)

# Pack them up and check the archive
z = archive.create_zip("out/big.zip", big)
console.print_success(f"{archive.zip_info(z).file_count} files, {z.stat().st_size:,} bytes")

# Layered config with dotted keys
cfg = config.merge_configs(config.load_config("defaults.yaml"), config.load_config("local.yaml"))
port = config.get_value(cfg, "database.port", default=5432)

# Verify a download
files.download_file("https://example.org/data.csv", "data.csv")
assert hashing.verify_file("data.csv", "9f86d081...")

Every function takes str or Path and returns Path objects for anything path-like. For what a Path already does well (suffix, stem, parent, stat(), rename()), use the Path.

Conversion

from novus_pytils.convert import convert

convert("song.flac", "song.mp3", bitrate="192k")   # pydub; ffmpeg for non-WAV
convert("photo.png", "photo.jpg", quality=85)      # Pillow; alpha dropped for JPEG

Audio and image conversion are optional extras so the core stays light. A missing backend raises MissingDependencyError with the install hint.

Development

make install   # create .venv with dev tooling
make check     # lint, format check, tests

History

Versions 0.0.1 through 0.0.64 were one-function-per-format wrappers over pydub and Pillow. 0.1.0 is a rewrite around the generic helpers that had accumulated underneath, with pathlib, type hints, and a test for every function. The old per-format functions are gone; formats.get_files and convert.convert replace them.

License

MIT. See LICENSE.

Metadata

Release files for novus-pytils 0.1.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 novus-pytils 0.1.0
File Size Uploaded Provenance
novus_pytils-0.1.0.tar.gz 106.4 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for novus-pytils 0.1.0
File Interpreter ABI Platform
novus_pytils-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 130.5 kB

Release files / novus_pytils-0.1.0.tar.gz

Download URL novus_pytils-0.1.0.tar.gz
Size 106.4 kB
Tags Source
SHA-256 checksum
How to use checksums
74049ebd812a28f8d27e07d9a6335789899073656974fc34155e2db6f71c9eeb
BLAKE2b-256 checksum
How to use checksums
6512448170e3ddf6c8f2c13ec3901ba4e3faaac27542fe3dc1c3bd67fa70509f
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 17, 2026.

Transparency log

Release files / novus_pytils-0.1.0-py3-none-any.whl

Download URL novus_pytils-0.1.0-py3-none-any.whl
Size 24.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3b004f1fd7ef0021cbf26c3febabfc09150fc0cde1d0cd5b5ba5f663656bacb3
BLAKE2b-256 checksum
How to use checksums
0924de49de218cb1e52eaac045ce009c57a8e59603009a0c7a4a6ee621f03ca0
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 17, 2026.

Transparency log

Security for novus-pytils 0.1.0

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for novus_pytils-0.1.0.tar.gz

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 17, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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