langchain-micompress
LangChain tools for MiCompress: let your agent compress images, PDFs, video, audio, Office documents, EPUB books and archives.
pip install langchain-micompress
Usage
from langchain_micompress import MiCompressCompressFile
tool = MiCompressCompressFile() # anonymous, or MiCompressCompressFile(api_key="mc_...")
print(tool.invoke({"path": "report.pdf", "preset": "extreme"}))
# Compressed report.pdf → report-min.pdf: 4.2MB → 610.3KB (86% smaller).
With an agent:
from langchain_micompress import MiCompressToolkit
tools = MiCompressToolkit().get_tools() # micompress_compress_file, micompress_list_formats
agent = create_agent(model, tools) # any LangChain / LangGraph agent
| Tool | What it does |
|---|---|
micompress_compress_file |
Compress a local file and write the smaller copy (default: <name>-min.<ext>). Arguments: path, optional output_path, preset (lossless, recommended, extreme), max_width (images). |
micompress_list_formats |
List the supported extensions by category. |
API key (optional)
Without a key the tools work anonymously within per-format size limits. For larger files
create a free key at micompress.com/account and set
MICOMPRESS_API_KEY, or pass api_key=.
What is sent where
The file is uploaded to micompress.com over HTTPS to be compressed. Uploaded originals are
deleted within about 10 minutes and results within 24 hours —
privacy policy. Files reachable by URL can also be
compressed with the hosted MCP server at https://micompress.com/mcp
(docs).
License
MIT
Metadata
Release files for langchain-micompress 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| langchain_micompress-0.1.0.tar.gz | 7.2 kB | Without provenance | Details for langchain_micompress-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| langchain_micompress-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for langchain_micompress-0.1.0-py3-none-any.whl |
Total release size: 15.2 kB
Release files / langchain_micompress-0.1.0.tar.gz
| Download URL | langchain_micompress-0.1.0.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a897392e101a75febad3f4fbd4915825e907bb78501b25a0b7311d05bcf0b617
|
|
BLAKE2b-256 checksum How to use checksums |
f53945e828577aefcb39cff8737407475e7b545163ecd08f9d9db80ff8dafc4e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.2
|
Release files / langchain_micompress-0.1.0-py3-none-any.whl
| Download URL | langchain_micompress-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dd24b8ef6c25824d7af4681f04ae0e6ebcefb0148d7ce930c5682d22204a5b60
|
|
BLAKE2b-256 checksum How to use checksums |
995fe998855f8da23cc9cb34abff7408aa12f4490fa3a2519cbe3f9c23b21e2e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.2
|
Security for langchain-micompress 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.
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.