picwish


Namepicwish JSON
Version 0.4.6 PyPI version JSON
download
home_pagehttps://github.com/d60/picwish
SummaryPicwish Photo Enhancer
upload_time2024-08-04 08:44:53
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PicWish API for Python 🎨✨

Enhance, generate, and process images **without tokens, accounts, or watermarks**, and enjoy **unlimited usage**!

## Features
- ✅  **AI Text-to-Image Generation**: Create images from text prompts with customizable themes, sizes, and quality.
- ✅  **Image Enhancement**: Improve image quality without watermark.
- ✅  **Background Removal**: Remove background from images.
- ✅  **OCR (Optical Character Recognition)**: Extract text from images with support for multiple languages and various output formats.

## Installation
To get started, install the `picwish` package using pip:

```bash
pip install picwish
```


## Quick Examples 🚀

### 1. AI Text-to-Image Generation 🤖
Generate images based on a text prompt with customizable settings:

```python
import asyncio
from picwish import PicWish, T2ITheme, T2IQuality, T2ISize

async def main():
    picwish = PicWish()

    # Generate images from text prompt
    results = await picwish.text_to_image(
        prompt='A girl',
        theme=T2ITheme.ANIME,
        size=T2ISize.FHD_1_1,
        batch_size=4,
        quality=T2IQuality.HIGH
    )

    for result in results:
        await result.download(f'{result.id}.png')

asyncio.run(main())
```


### 2. Image Enhancement
Enhance the quality of an image without a watermark:

```python
import asyncio
from picwish import PicWish

async def main():
    picwish = PicWish()

    # Enhance an image
    enhanced_image = await picwish.enhance('/path/to/input.jpg')
    await enhanced_image.download('enhanced_output.jpg')

asyncio.run(main())
```

### 3. Background Removal
Remove the background from an image:

```python
import asyncio
from picwish import PicWish

async def main():
    picwish = PicWish()

    # Remove background from an image
    background_removed_image = await picwish.remove_background('/path/to/input.jpg')
    await background_removed_image.download('background_removed_output.png')

asyncio.run(main())
```

### 4. OCR (Optical Character Recognition)
Extract text from images with support for multiple languages and output formats:

```python
import asyncio
from picwish import PicWish, OCRFormat

async def main():
    picwish = PicWish()
    ocr_result = await picwish.ocr(
        'input.jpg',
        format=OCRFormat.TXT
    )
    print(await ocr_result.text())

    # -----------------
    # Download as PNG
    ocr_result = await picwish.ocr(
        'input.jpg',
        format=OCRFormat.PDF
    )
    print(await ocr_result.download('result.pdf'))

asyncio.run(main())
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/d60/picwish",
    "name": "picwish",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/5b/66/8c7a21c2daadaec32a4851a9debc14ccf3e12b69dc351946408a748a20a1/picwish-0.4.6.tar.gz",
    "platform": null,
    "description": "# PicWish API for Python \ud83c\udfa8\u2728\r\n\r\nEnhance, generate, and process images **without tokens, accounts, or watermarks**, and enjoy **unlimited usage**!\r\n\r\n## Features\r\n- \u2705  **AI Text-to-Image Generation**: Create images from text prompts with customizable themes, sizes, and quality.\r\n- \u2705  **Image Enhancement**: Improve image quality without watermark.\r\n- \u2705  **Background Removal**: Remove background from images.\r\n- \u2705  **OCR (Optical Character Recognition)**: Extract text from images with support for multiple languages and various output formats.\r\n\r\n## Installation\r\nTo get started, install the `picwish` package using pip:\r\n\r\n```bash\r\npip install picwish\r\n```\r\n\r\n\r\n## Quick Examples \ud83d\ude80\r\n\r\n### 1. AI Text-to-Image Generation \ud83e\udd16\r\nGenerate images based on a text prompt with customizable settings:\r\n\r\n```python\r\nimport asyncio\r\nfrom picwish import PicWish, T2ITheme, T2IQuality, T2ISize\r\n\r\nasync def main():\r\n    picwish = PicWish()\r\n\r\n    # Generate images from text prompt\r\n    results = await picwish.text_to_image(\r\n        prompt='A girl',\r\n        theme=T2ITheme.ANIME,\r\n        size=T2ISize.FHD_1_1,\r\n        batch_size=4,\r\n        quality=T2IQuality.HIGH\r\n    )\r\n\r\n    for result in results:\r\n        await result.download(f'{result.id}.png')\r\n\r\nasyncio.run(main())\r\n```\r\n\r\n\r\n### 2. Image Enhancement\r\nEnhance the quality of an image without a watermark:\r\n\r\n```python\r\nimport asyncio\r\nfrom picwish import PicWish\r\n\r\nasync def main():\r\n    picwish = PicWish()\r\n\r\n    # Enhance an image\r\n    enhanced_image = await picwish.enhance('/path/to/input.jpg')\r\n    await enhanced_image.download('enhanced_output.jpg')\r\n\r\nasyncio.run(main())\r\n```\r\n\r\n### 3. Background Removal\r\nRemove the background from an image:\r\n\r\n```python\r\nimport asyncio\r\nfrom picwish import PicWish\r\n\r\nasync def main():\r\n    picwish = PicWish()\r\n\r\n    # Remove background from an image\r\n    background_removed_image = await picwish.remove_background('/path/to/input.jpg')\r\n    await background_removed_image.download('background_removed_output.png')\r\n\r\nasyncio.run(main())\r\n```\r\n\r\n### 4. OCR (Optical Character Recognition)\r\nExtract text from images with support for multiple languages and output formats:\r\n\r\n```python\r\nimport asyncio\r\nfrom picwish import PicWish, OCRFormat\r\n\r\nasync def main():\r\n    picwish = PicWish()\r\n    ocr_result = await picwish.ocr(\r\n        'input.jpg',\r\n        format=OCRFormat.TXT\r\n    )\r\n    print(await ocr_result.text())\r\n\r\n    # -----------------\r\n    # Download as PNG\r\n    ocr_result = await picwish.ocr(\r\n        'input.jpg',\r\n        format=OCRFormat.PDF\r\n    )\r\n    print(await ocr_result.download('result.pdf'))\r\n\r\nasyncio.run(main())\r\n```\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Picwish Photo Enhancer",
    "version": "0.4.6",
    "project_urls": {
        "Homepage": "https://github.com/d60/picwish"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2eb74652234c9b82438f9b9cb1b7c9d916814366a60b04b23da24647c9423ecc",
                "md5": "ec73d8d047f2e274fb83da0b0b4d8324",
                "sha256": "eefb462ce4b9768922e99478f24be9562a831457812ed9f198dee1feae1f94c0"
            },
            "downloads": -1,
            "filename": "picwish-0.4.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ec73d8d047f2e274fb83da0b0b4d8324",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 11448,
            "upload_time": "2024-08-04T08:44:51",
            "upload_time_iso_8601": "2024-08-04T08:44:51.265131Z",
            "url": "https://files.pythonhosted.org/packages/2e/b7/4652234c9b82438f9b9cb1b7c9d916814366a60b04b23da24647c9423ecc/picwish-0.4.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5b668c7a21c2daadaec32a4851a9debc14ccf3e12b69dc351946408a748a20a1",
                "md5": "118508c53af4fdb84c5cb87fa52357a5",
                "sha256": "19f0ecf18bc8edfc7dfb7a1745720fff30c9448e9d1d76b6ec62bc1f33074f96"
            },
            "downloads": -1,
            "filename": "picwish-0.4.6.tar.gz",
            "has_sig": false,
            "md5_digest": "118508c53af4fdb84c5cb87fa52357a5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 10911,
            "upload_time": "2024-08-04T08:44:53",
            "upload_time_iso_8601": "2024-08-04T08:44:53.144930Z",
            "url": "https://files.pythonhosted.org/packages/5b/66/8c7a21c2daadaec32a4851a9debc14ccf3e12b69dc351946408a748a20a1/picwish-0.4.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-04 08:44:53",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "d60",
    "github_project": "picwish",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "picwish"
}
        
Elapsed time: 0.27632s