Skip to main content

Toolvix

Toolvix is a Python library for simple file, PDF, PowerPoint, Word, and image automation.

Most functions can automatically discover matching files in the current working folder. For predictable pipelines, functions also accept a source value containing a path or a list of paths returned by another Toolvix function.

Installation

python -m pip install toolvix (or) py -m pip install toolvix

For PowerPoint/Word to PDF conversion on Windows:

pip install "toolvix[windows]"

Microsoft PowerPoint and/or Microsoft Word must also be installed for the corresponding conversion.

Examples & Usage Guide

For complete practical examples covering single functions, double-function chains, long chains, nested functions, and explicit source input, see:

Toolvix Examples & Usage Guide

The guide contains 60 examples. Each example uses the same structure: required files, where to keep them, code, output, and a sample result.

API reference

The table intentionally shows the complete callable syntax. Parameter explanations are kept on the individual function documentation pages so the main API table remains compact.

# Function syntax Automatic input Output Details
1 fileEncrypt(source=None) All non-.encrypted files Encrypted .encrypted files Function details
2 fileDecrypt(source=None) All .encrypted files Decrypted original files Function details
3 pdfMerge(output_file="Merged.pdf", source=None) All PDFs One merged PDF Function details
4 pdfExtract(pages, output_file="extracted.pdf", source=None) First PDF Extracted PDF Function details
5 pdfProtect(output_file="protected.pdf", password="12345", source=None) First PDF Protected PDF Function details
6 pdfToword(output_file=None, source=None) All PDFs DOCX file(s) Function details
7 pdfToppt(output_file=None, source=None) All PDFs PPTX file(s) Function details
8 pptTopdf(output_file=None, source=None) All PPTX files PDF file(s) Function details
9 wordTopdf(output_file=None, source=None) All DOCX files PDF file(s) Function details
10 imageTopdf(output_file="photos.pdf", source=None) All supported images One PDF Function details
11 imageResize(width=1920, height=1080, source=None) All supported images Resized image(s) Function details
12 imageWatermark(watermarkText="PREETAM", textSize=100, transparency=45, angle=25, source=None) All supported images Watermarked image(s) Function details
13 imageCompressor(targetSizeMB=1, source=None) All supported images Compressed JPG(s) Function details
14 pdfToimage(source=None) All PDFs Page PNG image(s) Function details

Examples & Usage Guide

Toolvix Examples & Usage Guide

Nested functions and chaining

Toolvix supports deterministic function pipelines. A function can pass its returned path or list of paths directly into another function.

Merge → Word

pdfToword(pdfMerge())

This converts only the PDF created by pdfMerge(). It does not convert every PDF in the working folder.

Merge → PowerPoint

pdfToppt(pdfMerge())

Merge → extract pages

pdfExtract([1, 2, 5], source=pdfMerge())

Merge → protect

pdfProtect(password="StrongPassword123!", source=pdfMerge())

Merge → images

pdfToimage(pdfMerge())

Resize → watermark → PDF

imageTopdf(
    source=imageWatermark(
        "PREETAM",
        source=imageResize(1600, 1200)
    )
)

Read the complete chaining guide

See Nested functions and chaining, which documents compatible nesting patterns, automatic discovery versus pipeline input, return-value rules, and examples.

Input behavior

There are two modes.

1. Automatic discovery

pdfToword()

All PDFs in the current working folder are converted.

2. Explicit pipeline input

merged = pdfMerge()
pdfToword(merged)

Only the PDF returned by pdfMerge() is converted.

The same source mechanism is available throughout the API. This prevents generated results from accidentally causing unrelated files in the working folder to be processed.

Return values

  • One selected output file → pathlib.Path
  • Multiple output files → list[pathlib.Path]
  • No matching input → None

These return values are what make nested calls possible.

Output folders

Toolvix keeps generated files in separate folders, including:

  • merged pdf
  • extracted pdfs
  • protected pdfs
  • converted word files
  • converted ppt files
  • converted pdf files
  • converted pdfs
  • resized images
  • watermarked images
  • compressed images
  • converted images

Supported image formats

Image functions support:

  • JPG / JPEG
  • PNG
  • WEBP
  • BMP

Notes

  • Run your script from the folder containing the files you want Toolvix to discover.
  • When source is supplied, only the supplied files are processed.
  • Office conversions require the corresponding Microsoft Office application on Windows.
  • pdfToword() requires pdf2docx.
  • pdfToppt() and pdfToimage() use PyMuPDF.
  • Do not store passwords or sensitive files in the working folder when using fileEncrypt().

Documentation hosting

The repository contains detailed Markdown pages and a standalone HTML documentation site under docs/.

The Details links in the API table are repository-relative documentation links. To make those links open as independent web pages directly from the PyPI description, the docs/ site must be hosted (for example with GitHub Pages or Read the Docs). Once a real documentation URL is available, it should be added to [project.urls] in pyproject.toml and the table links can be changed to those absolute URLs.

A documentation URL should not be invented before the site is actually hosted.

Release files for toolvix 0.1.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 toolvix 0.1.2
File Size Uploaded
toolvix-0.1.2.tar.gz 25.6 kB Details

Built distribution (wheel)

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

Total release size: 42.7 kB

Release files / toolvix-0.1.2.tar.gz

Download URL toolvix-0.1.2.tar.gz
Size 25.6 kB
Tags Source
SHA-256 checksum
How to use checksums
86dd3fa71cc076c024cac105cc36c9d12406ce7df3a18f54e30d2d56e2024ad7
BLAKE2b-256 checksum
How to use checksums
5c3183c1b1c5fc6558c0f8cefa35855afa2e750e25416ed25d13faf769065b0b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Release files / toolvix-0.1.2-py3-none-any.whl

Download URL toolvix-0.1.2-py3-none-any.whl
Size 17.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2e2fcb84da4d83969d3a099d11451d14768239b72c31f53782549cf723d1bd50
BLAKE2b-256 checksum
How to use checksums
9d01371a5dc5de12d49d4ec756a591be7d5115351eea77053756852a423c89e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Release history Release notifications | RSS feed

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

This release

0.1.2 This release

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