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

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.

Quick start

from toolvix import *

pdfMerge()
pdfExtract([1, 2])
pdfProtect(password="StrongPassword123!")

imageTopdf()
imageResize(1920, 1080)
imageWatermark("PREETAM")
imageCompressor(1)

fileEncrypt()
fileDecrypt()

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

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.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 toolvix 0.1.1
File Size Uploaded
toolvix-0.1.1.tar.gz 21.3 kB Details

Built distribution (wheel)

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

Total release size: 38.3 kB

Release files / toolvix-0.1.1.tar.gz

Download URL toolvix-0.1.1.tar.gz
Size 21.3 kB
Tags Source
SHA-256 checksum
How to use checksums
0348fc756029a98f0db39285be9f659bd1d7260ded251fd990b9277813f2a93f
BLAKE2b-256 checksum
How to use checksums
c1f1aa3458820c6f936ede07467c7a3cc1bd4902d1cef8f041b0a68a43e41942
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.1-py3-none-any.whl

Download URL toolvix-0.1.1-py3-none-any.whl
Size 17.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
64c16859ba74d8de3411260e08b21105fe99bbaf147fcecd70955879a7950a5d
BLAKE2b-256 checksum
How to use checksums
945937bc5152f702a1c1cb0eb45b517b9ca467b6bf3bc2e51bbc0e713fca35a4
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

0.1.2

2 release files

This release

0.1.1 This release

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