Skip to main content

pylizlib

pylizlib is a Python utility library for application configuration, data and text handling, network requests, filesystem operations, and directory snapshots. Optional packages add media processing, AI-assisted media scanning, and Qt desktop components.

The core utilities install with the base package. Media, AI, and Qt dependencies are optional so applications only need to install the features they use.

Install

From PyPI

python -m pip install pylizlib

This installs the core package and its required dependencies. Install an extra to add an optional feature:

Extra Provides Install command
media Image, video, and audio helpers, metadata parsing, and frame sampling python -m pip install "pylizlib[media]"
qt Desktop components based on PySide6 python -m pip install "pylizlib[qt]"
qtfw PySide6 and PySide6-Fluent-Widgets components python -m pip install "pylizlib[qtfw]"
ai JoyTag, NudeNet, and EasyOCR scanning providers python -m pip install "pylizlib[ai]"
ai-macos Compatibility alias for the ai extra python -m pip install "pylizlib[ai-macos]"
ai-linux-nvidia AI dependencies with the NVIDIA ONNX Runtime package on Linux python -m pip install "pylizlib[ai-linux-nvidia]"

Extras can be combined, for example:

python -m pip install "pylizlib[media,qt]"

The AI extras include large machine-learning dependencies. AI providers may also need model files, network access, and substantial local compute resources. The Linux NVIDIA option requires compatible NVIDIA drivers on the host.

From a source checkout

To install the checkout into the active Python environment:

python -m pip install .

For an editable install with media support, for example:

python -m pip install -e ".[media]"

For development, use the repository's uv environment as described below.

What is included

The library is organized into importable subpackages. Import APIs from the feature package you use; for example, snapshot types live under pylizlib.core.os.snap, and the optional scanner lives under pylizlib.ai.

Package Capabilities Dependencies
pylizlib.core Application paths and INI/TOML configuration; JSON, regular-expression, and data helpers; shared domain models, operation progress, and logging; HTTP, SSL, and download helpers; OS and filesystem utilities Installed with the base package
pylizlib.core.data.text Streaming text search, text encoding detection, literal and timed regular-expression matching, previews, and bounded result pages Base package
pylizlib.core.os.paths and pylizlib.core.os.filesystem Path normalization, identity and containment checks; tree scans, metadata, file types, capacity checks, locking, atomic writes, and durability primitives Base package
pylizlib.core.os.archives.zip ZIP validation, extraction, and staged publication helpers Base package
pylizlib.core.os.windows Windows-specific drive, process, command, security descriptor, and alternate data stream helpers Base package; native integrations are platform-specific
pylizlib.core.os.snap Snapshot catalogues and models, directory capture and installation, synchronization and edits, ZIP backup/restore and import/export, integrity checking, recovery, and bounded content search Base package
pylizlib.media LizMedia models, media metadata and sidecars, image/video/audio helpers, frame selection, and video sampling media extra
pylizlib.ai AI media scanning with JoyTag (TAGS), NudeNet (NSFW), and EasyOCR (OCR) providers; accepts file paths or base64 content ai, ai-macos, or ai-linux-nvidia extra
pylizlib.qt PySide6 configuration and preferences, menus and toolbars, themes and resources, reusable widgets, and background operation handling qt extra
pylizlib.qtfw Settings models and widgets built with PySide6-Fluent-Widgets qtfw extra

The compatibility modules pylizlib.core.os.path, file, and utils remain available for existing imports. New code should prefer the focused pylizlib.core.os.paths and pylizlib.core.os.filesystem packages.

Snapshot example

The following searches the contents of snapshots already present in a catalogue. It searches text files by default; pass query_type=QueryType.REGEX to use a regular expression, or search_target=SearchTarget.FILE_NAME to search names.

from pathlib import Path

from pylizlib.core.os.snap import (
    QueryType,
    SearchTarget,
    SnapshotCatalogue,
    SnapshotSearchParams,
    SnapshotSearcher,
)

catalogue = SnapshotCatalogue(Path("./snapshot-catalogue"))
snapshots = catalogue.get_all()
searcher = SnapshotSearcher(catalogue)

matches = searcher.search_list(
    snapshots,
    SnapshotSearchParams(
        query="needle",
        search_target=SearchTarget.FILE_CONTENT,
        query_type=QueryType.TEXT,
        extensions=[".txt", ".md"],
    ),
)

for match in matches:
    print(match.file_path)

SnapshotCatalogue handles catalogue-level operations such as lookup, import and export, backups, and restore. SnapshotManager provides operations for one snapshot, including capture, installation, edits, and synchronization. The catalogue path in this example must point to a catalogue containing snapshots for the search to return results.

Snapshot behavior and limits

Snapshot operations validate source and destination paths before destructive work. Symlinks and Windows junctions are rejected in snapshot tree operations. Captured directory copies can include integrity manifests; workflows that replace or publish data use staging and transaction journals where specified by the operation. ZIP imports and restores validate archive contents and apply configurable entry-count and expanded-size limits before extraction.

The default SnapshotSettings copy mode preserves file contents and standard file/subdirectory metadata. Its EXTENDED mode can also copy owner and group when permitted, extended attributes and ACLs exposed by the operating system, Windows alternate data streams, and hard links within an individual copied tree. Extended metadata depends on source and destination filesystem support and permissions; a requested attribute that cannot be copied causes the copy to fail before publication. ZIP backups do not preserve owner, ACLs, extended attributes, alternate data streams, or hard-link topology.

Filesystem durability depends on the operating system and filesystem. In particular, a successful flush on SMB or NFS cannot prove that a remote server has persisted data to stable storage. See the snapshot guide for operation-specific recovery behavior, compatibility details, and limits.

Optional feature examples

AI media scan

After installing an AI extra, AiMediaScanner returns a LizMedia object with the requested scan results attached:

from pylizlib.ai import AiMediaScanner

scanner = AiMediaScanner()
media = scanner.scan(
    media_path="/path/to/image.jpg",
    tools=["TAGS", "OCR", "NSFW"],
)

print(media.ai_tags)
print(media.ai_has_ocr_text)
print(media.ai_nsfw)

The AI guide documents accepted tool names, base64 inputs, platform extras, and integration requirements.

License

This project is released under The Unlicense, with the aim of dedicating its copyright to the public domain. It allows anyone to use, copy, modify, publish, distribute, compile, and sell the project for any purpose, without requiring permission, attribution, or preservation of copyright notices. The license text also disclaims warranties and liability.

The legal effect of a public-domain dedication can vary by jurisdiction. This license applies to material the project authors are entitled to release; third-party dependencies and separately identified third-party materials keep their own licenses.

Development

The repository uses uv with pyproject.toml and the committed uv.lock file. Install the standard development tools with:

uv sync --group dev

Development dependencies are separated into groups:

Group Tools
dev pytest, pytest-cov, Ruff, and git-cliff
build PyInstaller
typing ty
docs pdoc
graphics SVG/vector and raster image tooling used by graphics scripts

Add a group when needed, for example uv sync --group dev --group docs. These are repository development groups, separate from the installable package extras in the previous section. uv sync --all-groups --all-extras installs all groups and features, including the large AI and Qt dependency sets.

Common repository commands:

make lint
make format-check
make type-check
make test
make docs-snap
make docs

make test runs the configured suite with the media, qt, and qtfw extras. AI integration tests can require network access and model files. Unit tests are under test/unit/; end-to-end feature workflows are under test/integration/<feature>/. Generated API documentation is written to docs/api, while the focused snapshot preview is written to temp_local/docs_snap_preview.

See AI_CONTEXT.md for the repository architecture and AGENTS.md for contribution and testing conventions. Release history is in CHANGELOG.md.

Release notes

[1.0.11] - 2026-11-30

Bump

  • V1.0.11

♻️ Refactor

  • snapshot: Share snapshot storage construction
  • snapshot: Extract catalogue read workflows
  • snapshot: Check catalogue journals once per read
  • snapshot: Share the catalogue capture workflow
  • snapshot: Share the captured-tree duplication workflow
  • snapshot: Keep pre-delete backup and removal together
  • snapshot: Share the staged tree publication guard
  • snapshot: Route catalogue updates through the editor
  • snapshot: Verify confirmed fields during edit preparation
  • snapshot: Isolate ordered JSON field updates
  • snapshot: Isolate legacy association changes
  • snapshot: Share journaled metadata publication
  • snapshot: Route catalogue sync through the synchronizer
  • snapshot: Isolate sync source inspection
  • snapshot: Clarify staged sync captures and journal entries
  • snapshot: Reuse sync metadata publication and recovery
  • snapshot: Bind catalogue installation to persisted storage
  • snapshot: Isolate installation swap planning
  • snapshot: Separate installation source staging
  • snapshot: Isolate installation backup verification
  • snapshot: Share installation metadata publication
  • snapshot: Extract installed-copy removal service
  • snapshot: Bind removal facades directly to storage
  • snapshot: Share installed-removal target validation
  • snapshot: Isolate registry reconciliation after removal
  • snapshot: Isolate staged moves for association removal
  • snapshot: Isolate backup inventory and ZIP detection
  • snapshot: Isolate confirmed backup cleanup
  • snapshot: Separate backup source selection and scanning
  • snapshot: Isolate backup content verification
  • snapshot: Separate restore extraction planning
  • snapshot: Separate archive metadata and legacy restore lookup
  • snapshot: Isolate stored snapshot tree restore
  • snapshot: Isolate journaled association restore
  • snapshot: Route snapshot exports through archive services
  • snapshot: Isolate catalogue ZIP export
  • snapshot: Share staged publication for snapshot imports
  • snapshot: Isolate import validation and legacy migration
  • snapshot: Separate date and association validation
  • snapshot: Centralize live copy strategy selection
  • snapshot: Share staged copy publication
  • snapshot: Share manifest-aware delegate calls
  • snapshot: Isolate search candidate discovery
  • snapshot: Isolate query compilation and filename matching
  • snapshot: Isolate snapshot file search adapters
  • snapshot: Isolate bounded snapshot scanning

🧪 Testing

  • snapshot: Cover source changes around sync backups
  • snapshot: Characterize interrupted installed-copy removal
  • snapshot: Characterize confirmed backup cleanup preflight
  • snapshot: Cover restore space across mapped destinations
  • snapshot: Cover installation history reset before imports
  • snapshot: Cover staged copy destination collisions
  • snapshot: Characterize live search filters and lookahead

Metadata

Release files for pylizlib 1.0.11

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

Source distribution (sdist)

Source distribution for pylizlib 1.0.11
File Size Uploaded Provenance Actions
pylizlib-1.0.11.tar.gz 292.1 kB Without provenance Details for pylizlib-1.0.11.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pylizlib 1.0.11
File Interpreter ABI Platform Actions
pylizlib-1.0.11-py3-none-any.whl Python 3 none any Details for pylizlib-1.0.11-py3-none-any.whl

Total release size: 679.4 kB

Release files / pylizlib-1.0.11.tar.gz

Download URL pylizlib-1.0.11.tar.gz
Size 292.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e12861c8a52f0b1cb1f027fb47560e5c587ea079541e9d6dabdc8615f11e3959
BLAKE2b-256 checksum
How to use checksums
e9e9c91f403614318b4dc4aaedb67e6509f593828126516a9bcd3f93abca30aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pylizlib-1.0.11-py3-none-any.whl

Download URL pylizlib-1.0.11-py3-none-any.whl
Size 387.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bc1cee3915df653dc50d5fe87069f04a240ce54d9aef949a1125fecb1f7dbc8d
BLAKE2b-256 checksum
How to use checksums
c6eadcd7e0948b3ce54f6706d74dda8585894ad92bd941d6c88a61e84a75653a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for pylizlib 1.0.11

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.

Release history Release notifications | RSS feed

This release

1.0.11 This release

2 release files No 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