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.
| # | Package | Function Name | Function Syntax | Automatic Input | Output | Details |
|---:|---|---|---|---|
| 1 | filetools | fileEncrypt() | fileEncrypt(source=None) | All non-.encrypted files | Encrypted .encrypted files | Function details |
| 2 | filetools | fileDecrypt() | fileDecrypt(source=None) | All .encrypted files | Decrypted original files | Function details |
| 3 | pdftools | pdfMerge() | pdfMerge(output_file="Merged.pdf", source=None) | All PDFs | One merged PDF | Function details |
| 4 | pdftools | pdfExtract() | pdfExtract(pages, output_file="extracted.pdf", source=None) | First PDF | Extracted PDF | Function details |
| 5 | pdftools | pdfProtect() | pdfProtect(output_file="protected.pdf", password="12345", source=None) | First PDF | Protected PDF | Function details |
| 6 | pdftools | pdfToword() | pdfToword(output_file=None, source=None) | All PDFs | DOCX file(s) | Function details |
| 7 | pdftools | pdfToppt() | pdfToppt(output_file=None, source=None) | All PDFs | PPTX file(s) | Function details |
| 8 | pdftools | pptTopdf() | pptTopdf(output_file=None, source=None) | All PPTX files | PDF file(s) | Function details |
| 9 | pdftools | wordTopdf() | wordTopdf(output_file=None, source=None) | All DOCX files | PDF file(s) | Function details |
| 10 | imagetools | imageTopdf() | imageTopdf(output_file="photos.pdf", source=None) | All supported images | One PDF | Function details |
| 11 | imagetools | imageResize() | imageResize(width=1920, height=1080, source=None) | All supported images | Resized image(s) | Function details |
| 12 | imagetools | imageWatermark() | imageWatermark(watermarkText="PREETAM", textSize=100, transparency=45, angle=25, source=None) | All supported images | Watermarked image(s) | Function details |
| 13 | imagetools | imageCompressor() | imageCompressor(targetSizeMB=1, source=None) | All supported images | Compressed JPG(s) | Function details |
| 14 | pdftools | pdfToimage() | 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 pdfextracted pdfsprotected pdfsconverted word filesconverted ppt filesconverted pdf filesconverted pdfsresized imageswatermarked imagescompressed imagesconverted 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
sourceis supplied, only the supplied files are processed. - Office conversions require the corresponding Microsoft Office application on Windows.
pdfToword()requirespdf2docx.pdfToppt()andpdfToimage()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.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| toolvix-0.1.3.tar.gz | 25.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| toolvix-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 42.7 kB
Release files / toolvix-0.1.3.tar.gz
| Download URL | toolvix-0.1.3.tar.gz |
|---|---|
| Size | 25.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
76310bf406ccad09fb8f11b5c2ffc4502d688ca4b95764e9a748566bb836e5f4
|
|
BLAKE2b-256 checksum How to use checksums |
87c27e27ee4fe9d125ed642256dcbfe92e20bc6428025cde0ceea023d46eeac9
|
| 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.3-py3-none-any.whl
| Download URL | toolvix-0.1.3-py3-none-any.whl |
|---|---|
| Size | 17.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f4368b80b71076eb2a1bfad4437e03cf435661803384be6250b8f526bf71d8fd
|
|
BLAKE2b-256 checksum How to use checksums |
b2e1c33600a9420f8750e8f324765120c3a6ccf9d27fb07b6c46b5e40f4418af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|