# Scaler
A Python library for image scaling, conversion and document thumbnail generation.
## Installation
```sh
pip install scaler-pics
```
## Usage
```python
from scaler-pics import Scaler, TransformOptions, InputOptions, OutputOptions, Fit, ImageDelivery
# Initialize the Scaler instance with the API key
scaler = Scaler(api_key='your_api_key')
# Define the transform options
options = TransformOptions(
input=InputOptions(localPath='path/to/image.heic'),
output=OutputOptions(
type='jpeg',
fit=Fit(width=1024, height=1024),
imageDelivery=ImageDelivery(saveToLocalPath='path/to/output.jpg'),
quality=0.8
)
)
# Perform the transformation
response = scaler.transform(options)
print(response)
```
Get API key from [Scaler](https://scaler.pics)
Raw data
{
"_id": null,
"home_page": "https://github.com/scaler-pics/scaler.pics-py",
"name": "scaler-pics",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": null,
"author": "Matej Ukmar",
"author_email": "matejukmar@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/a0/0d/a2bed4f7827029faef9d101224a8af5fb812f1688b53ef19979b8a9b065e/scaler-pics-1.0.2.tar.gz",
"platform": null,
"description": "# Scaler\n\nA Python library for image scaling, conversion and document thumbnail generation.\n\n## Installation\n\n```sh\npip install scaler-pics\n```\n\n## Usage\n\n```python\nfrom scaler-pics import Scaler, TransformOptions, InputOptions, OutputOptions, Fit, ImageDelivery\n\n# Initialize the Scaler instance with the API key\nscaler = Scaler(api_key='your_api_key')\n\n# Define the transform options\noptions = TransformOptions(\n input=InputOptions(localPath='path/to/image.heic'),\n output=OutputOptions(\n type='jpeg',\n fit=Fit(width=1024, height=1024),\n imageDelivery=ImageDelivery(saveToLocalPath='path/to/output.jpg'),\n quality=0.8\n )\n)\n\n# Perform the transformation\nresponse = scaler.transform(options)\nprint(response)\n```\n\nGet API key from [Scaler](https://scaler.pics)\n",
"bugtrack_url": null,
"license": null,
"summary": "A Python library for image scaling, conversion and document thumbnail generation.",
"version": "1.0.2",
"project_urls": {
"Homepage": "https://github.com/scaler-pics/scaler.pics-py"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d741f25ea65da6e9212ae86ef74f2e3082973e51d56a53f5424021c637c0dd5f",
"md5": "0d279189622aa92bf211a0ec39eef9d0",
"sha256": "17c11a13176fbcc1078af0158e01b71e02eb34f55ca8ba95d96a8bb92ce2df18"
},
"downloads": -1,
"filename": "scaler_pics-1.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0d279189622aa92bf211a0ec39eef9d0",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 5314,
"upload_time": "2024-08-31T10:52:44",
"upload_time_iso_8601": "2024-08-31T10:52:44.762758Z",
"url": "https://files.pythonhosted.org/packages/d7/41/f25ea65da6e9212ae86ef74f2e3082973e51d56a53f5424021c637c0dd5f/scaler_pics-1.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a00da2bed4f7827029faef9d101224a8af5fb812f1688b53ef19979b8a9b065e",
"md5": "82c94754fe863a74f64ac438797215ef",
"sha256": "f425690dab55e94823ee7af8213894c598af0825317ddfacaf670b7730c9d357"
},
"downloads": -1,
"filename": "scaler-pics-1.0.2.tar.gz",
"has_sig": false,
"md5_digest": "82c94754fe863a74f64ac438797215ef",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 4954,
"upload_time": "2024-08-31T10:52:46",
"upload_time_iso_8601": "2024-08-31T10:52:46.369447Z",
"url": "https://files.pythonhosted.org/packages/a0/0d/a2bed4f7827029faef9d101224a8af5fb812f1688b53ef19979b8a9b065e/scaler-pics-1.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-31 10:52:46",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "scaler-pics",
"github_project": "scaler.pics-py",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "scaler-pics"
}