Metadata-Version: 2.4
Name: pixel-press
Version: 1.0.0
Summary: FastAPI image resizing microservice with recursive batch support
License: MIT License
        
        Copyright (c) 2026 Pixel Press contributors
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fastapi<1.0,>=0.115
Requires-Dist: uvicorn[standard]<1.0,>=0.30
Requires-Dist: python-multipart<1.0,>=0.0.9
Requires-Dist: Pillow<12.0,>=10.4
Provides-Extra: test
Requires-Dist: pytest<9.0,>=8.0; extra == "test"
Requires-Dist: httpx<1.0,>=0.27; extra == "test"
Dynamic: license-file

# Pixel Press

A FastAPI microservice for resizing images to a maximum longest-edge dimension. It preserves aspect ratio, supports common image formats through Pillow, and can recursively process a folder upload into a ZIP while preserving relative paths.

## Run

```powershell
py -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install .
python main.py
```

Open [http://127.0.0.1:8097](http://127.0.0.1:8097).

## CLI

Resize a directory and all of its subfolders. The output defaults to a sibling directory named `<input>_resized`:

```powershell
imgresizer --dir .\photos --max-dimension 2048
```

Choose an explicit output directory with `--output`. Add `--verbose` for debug logs. The CLI logs each processed or skipped file and a final summary.

## Publish

Build the wheel and source archive, then upload them with your PyPI credentials:

```powershell
python -m pip install build twine
python -m build
python -m twine upload dist\*
```

After publishing, users can install the package with `python -m pip install pixel-press` and use either the `imgresizer` CLI or `python -m imgresizer.main` to start the web service.

## API

- `POST /api/resize`: multipart fields `file`, `max_dimension`; returns the resized image.
- `POST /api/resize-folder`: multipart fields `files[]`, `max_dimension`; returns `pixel-press-resized.zip`.
