Metadata-Version: 2.4
Name: micompress
Version: 0.1.0
Summary: Compress images, PDFs, video, audio, documents & archives from the command line — powered by micompress.com
Author: MiCompress
License: MIT
Project-URL: Homepage, https://micompress.com
Project-URL: Source, https://github.com/micompress/micompress-python
Keywords: compress,compression,image,pdf,optimize,minify,cli,micompress
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Multimedia :: Graphics :: Graphics Conversion
Classifier: Topic :: Utilities
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# micompress

> Compress **images, PDFs, video, audio, documents & archives** from your terminal or Python.
> Powered by [**micompress.com**](https://micompress.com/?utm_source=pypi&utm_medium=cli&utm_campaign=extend).

A tiny **zero-dependency** client (standard library only) that sends your file to the
MiCompress engine and writes back the optimized result.

```bash
pip install micompress
```

## CLI usage

```bash
micompress photo.jpg                 # → photo-min.jpg
micompress *.png --preset extreme
micompress report.pdf slides.pptx -o out/
micompress big.jpg --max-width 1920 --json
```

| Option | Description |
|--------|-------------|
| `-o, --output DIR` | Write results to a directory (default: alongside input, `-min` suffix) |
| `-p, --preset` | `lossless` · `recommended` (default) · `extreme` |
| `--max-width PX` | Resize images down to a maximum width |
| `--token JWT` | Auth token for higher size limits |
| `--api URL` | Override API base URL |
| `--json` | Machine-readable output |
| `-q, --quiet` | Only print errors |

## Python API

```python
from micompress import compress_file

data, meta = compress_file("photo.jpg", preset="extreme")
open("photo-min.jpg", "wb").write(data)
print(meta["savedPercent"], "% smaller")
```

## Supported formats

Image (jpg, png, webp, gif, tiff, avif, svg, heic, psd, raw…), PDF & Office docs,
video (mp4, mov, mkv, webm…), audio (mp3, wav, flac…), archives (zip, 7z, tar, gz).
Full list: **https://micompress.com/all-tools**

## Requirements

Python **3.8+**. No third-party dependencies.

## License

MIT © [MiCompress](https://micompress.com)

---

<sub>Prefer a web UI or bigger batches? Use **[micompress.com](https://micompress.com/?utm_source=pypi&utm_medium=cli&utm_campaign=extend)**.</sub>
