# Shrinkix
[](https://github.com/Dashstrom/shrinkix/actions/workflows/docs.yml) [](https://github.com/Dashstrom/shrinkix/actions/workflows/lint.yml) [](https://github.com/Dashstrom/shrinkix/actions/workflows/tests.yml) [](https://pypi.org/project/shrinkix) [](https://pypi.org/project/shrinkix) [](https://github.com/Dashstrom/shrinkix/blob/main/LICENSE)
Reduces the size of images for the web.
## Documentation
Documentation is available on <https://dashstrom.github.io/shrinkix>.
## Installation
```bash
# Using pip
pip install shrinkix
# Using uv (install in your project dependencies)
uv add shrinkix
# Using pipx (install as a tool in a venv)
pipx install shrinkix
# Using uv (install as a tool in a venv)
uv tool install shrinkix
```
## Usage
### Usage as CLI
```bash
shrinkix image.png --max-width 1024 --max-height 1024 --artist 'You' --copyright 'you@example.com'
```
### Usage as module
```python
from shrinkix import Shrinkix
shrinkix = Shrinkix(
max_width=1024,
max_height=1024,
keep_metadata=False,
)
shrinkix.shrink("tests/resources/test.jpg", "test.png")
```
## Development
### Contributing
Contributions are very welcome. Tests can be run with `poe check`, please ensure the coverage at least stays the same before you submit a pull request.
### Prerequisite
First, You need to install [git](https://git-scm.com) following [the official guide](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) and configure it.
Then, you need to install [uv](https://docs.astral.sh/uv/getting-started/installation) and update shell path with this command:
```bash
uv tool update-shell
```
Finally, run these commands for setup the project with dev dependencies.
```bash
git clone https://github.com/Dashstrom/shrinkix
cd shrinkix
uv sync --all-extras --python 3.10
uv run poe setup
```
### Poe
Poe is available for help you to run tasks: `uv run poe {task}` or `poe task` within the venv.
```text
test Run test suite.
lint Run linters: ruff checker and ruff formatter and mypy.
format Run linters in fix mode.
check Run all checks: lint, test and docs.
check-tag Check if the current tag match the version.
cov Run coverage for generate report and html.
open-cov Open html coverage report in webbrowser.
doc Build documentation.
open-doc Open documentation in webbrowser.
setup Setup pre-commit.
pre-commit Run pre-commit.
clean Clean cache files.
```
### How to add dependency
```bash
uv add 'PACKAGE'
```
### Ignore illegitimate warnings
To ignore illegitimate warnings you can add :
- **# noqa: ERROR_CODE** on the same line for ruff.
- **# type: ignore[ERROR_CODE]** on the same line for mypy.
- **# pragma: no cover** on the same line to ignore line for coverage.
- **# doctest: +SKIP** on the same line for doctest.
## License
This work is licensed under [MIT](https://github.com/Dashstrom/shrinkix/blob/main/LICENSE).
Raw data
{
"_id": null,
"home_page": null,
"name": "shrinkix",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": "Dashstrom <dashstrom.pro@gmail.com>",
"keywords": "cli, color-reduction, image, optimizer, python, reduce",
"author": null,
"author_email": "Dashstrom <dashstrom.pro@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/7f/db/1b04105e0fa4535330799974f3dec29985b6510acb9b432752b5a01d5b93/shrinkix-1.1.1.tar.gz",
"platform": null,
"description": "# Shrinkix\n\n[](https://github.com/Dashstrom/shrinkix/actions/workflows/docs.yml) [](https://github.com/Dashstrom/shrinkix/actions/workflows/lint.yml) [](https://github.com/Dashstrom/shrinkix/actions/workflows/tests.yml) [](https://pypi.org/project/shrinkix) [](https://pypi.org/project/shrinkix) [](https://github.com/Dashstrom/shrinkix/blob/main/LICENSE)\n\nReduces the size of images for the web.\n\n## Documentation\n\nDocumentation is available on <https://dashstrom.github.io/shrinkix>.\n\n## Installation\n\n```bash\n# Using pip\npip install shrinkix\n# Using uv (install in your project dependencies)\nuv add shrinkix\n# Using pipx (install as a tool in a venv)\npipx install shrinkix\n# Using uv (install as a tool in a venv)\nuv tool install shrinkix\n```\n\n## Usage\n\n### Usage as CLI\n\n```bash\nshrinkix image.png --max-width 1024 --max-height 1024 --artist 'You' --copyright 'you@example.com'\n```\n\n### Usage as module\n\n```python\nfrom shrinkix import Shrinkix\n\nshrinkix = Shrinkix(\n max_width=1024,\n max_height=1024,\n keep_metadata=False,\n)\nshrinkix.shrink(\"tests/resources/test.jpg\", \"test.png\")\n```\n\n## Development\n\n### Contributing\n\nContributions are very welcome. Tests can be run with `poe check`, please ensure the coverage at least stays the same before you submit a pull request.\n\n### Prerequisite\n\nFirst, You need to install [git](https://git-scm.com) following [the official guide](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) and configure it.\n\nThen, you need to install [uv](https://docs.astral.sh/uv/getting-started/installation) and update shell path with this command:\n\n```bash\nuv tool update-shell\n```\n\nFinally, run these commands for setup the project with dev dependencies.\n\n```bash\ngit clone https://github.com/Dashstrom/shrinkix\ncd shrinkix\nuv sync --all-extras --python 3.10\nuv run poe setup\n```\n\n### Poe\n\nPoe is available for help you to run tasks: `uv run poe {task}` or `poe task` within the venv.\n\n```text\ntest Run test suite.\nlint Run linters: ruff checker and ruff formatter and mypy.\nformat Run linters in fix mode.\ncheck Run all checks: lint, test and docs.\ncheck-tag Check if the current tag match the version.\ncov Run coverage for generate report and html.\nopen-cov Open html coverage report in webbrowser.\ndoc Build documentation.\nopen-doc Open documentation in webbrowser.\nsetup Setup pre-commit.\npre-commit Run pre-commit.\nclean Clean cache files.\n```\n\n### How to add dependency\n\n```bash\nuv add 'PACKAGE'\n```\n\n### Ignore illegitimate warnings\n\nTo ignore illegitimate warnings you can add :\n\n- **# noqa: ERROR_CODE** on the same line for ruff.\n- **# type: ignore[ERROR_CODE]** on the same line for mypy.\n- **# pragma: no cover** on the same line to ignore line for coverage.\n- **# doctest: +SKIP** on the same line for doctest.\n\n## License\n\nThis work is licensed under [MIT](https://github.com/Dashstrom/shrinkix/blob/main/LICENSE).\n",
"bugtrack_url": null,
"license": null,
"summary": "Reduces the size of images for the web.",
"version": "1.1.1",
"project_urls": {
"Documentation": "https://dashstrom.github.io/shrinkix",
"Homepage": "https://github.com/Dashstrom/shrinkix",
"Issues": "https://github.com/Dashstrom/shrinkix/issues",
"Source": "https://github.com/Dashstrom/shrinkix"
},
"split_keywords": [
"cli",
" color-reduction",
" image",
" optimizer",
" python",
" reduce"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "4a228dd71300975654f3e8ae010b4fe5ae0b881d04ec99a3309829b6d4e95437",
"md5": "c0fe3fe4a727597037d0abb076fc4811",
"sha256": "8b8fe487d10313bfa386a92e5c1dde7223f162eb61fa88872381f7d1d58a2a8c"
},
"downloads": -1,
"filename": "shrinkix-1.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c0fe3fe4a727597037d0abb076fc4811",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 12070,
"upload_time": "2025-08-08T21:08:48",
"upload_time_iso_8601": "2025-08-08T21:08:48.282390Z",
"url": "https://files.pythonhosted.org/packages/4a/22/8dd71300975654f3e8ae010b4fe5ae0b881d04ec99a3309829b6d4e95437/shrinkix-1.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "7fdb1b04105e0fa4535330799974f3dec29985b6510acb9b432752b5a01d5b93",
"md5": "ea4d0d1ee7cd671b7a010da9cd5517a3",
"sha256": "093a883dff7ae1a4cddab78e7c939522a256e414102b521a8bb058e015cf2a2c"
},
"downloads": -1,
"filename": "shrinkix-1.1.1.tar.gz",
"has_sig": false,
"md5_digest": "ea4d0d1ee7cd671b7a010da9cd5517a3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 4073800,
"upload_time": "2025-08-08T21:08:49",
"upload_time_iso_8601": "2025-08-08T21:08:49.616660Z",
"url": "https://files.pythonhosted.org/packages/7f/db/1b04105e0fa4535330799974f3dec29985b6510acb9b432752b5a01d5b93/shrinkix-1.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-08 21:08:49",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Dashstrom",
"github_project": "shrinkix",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "shrinkix"
}