# pixian-ai
Python SDK for [pixian.ai](https://pixian.ai/).
## What is it?
Remove image backgrounds.
## Install
```bash
$ pip install pixian-ai
```
## Usage
### Basic
```python
from pixian_ai import PixianAI
client = PixianAI(
api_id="PIXIAN-AI-API-ID",
api_secret="PIXIAN-AI-API-SECRET",
)
img = client.remove_background("/path/to/input.jpeg")
img.save("/path/to/output.jpeg")
```
You can also use:
```python
client.remove_background(image_base64="base64encodedimage==")
# or
client.remove_background(image_url="https://imageurl.com/test.jpeg")
```
### Advanced
```python
client.remove_background(
image_path="/path/to/image.jpeg",
max_pixels=100,
background_color="#0055FF"
...
)
```
Reference: [https://pixian.ai/api](https://pixian.ai/api#:~:text=uploading%20binary%20files.-,Parameters,-The%20input%20image)
All parameters described in the API spec above replace period (`.`) with underscore (`_`). For example, if the parameter is `background.color`, the SDK will use `background_color`.
## Contributing
Feel free to open a PR for any changes!
## Testing
```bash
$ python -m unittest discover -s tests -p 'test_*.py'
```
Made with ❤️ by [@mitchbregs](https://twitter.com/mitchbregs)
Raw data
{
"_id": null,
"home_page": "https://github.com/mitchbregs/pixian-ai",
"name": "pixian-ai",
"maintainer": "",
"docs_url": null,
"requires_python": ">3.6",
"maintainer_email": "",
"keywords": "pixian.ai remove background",
"author": "Mitchell Bregman",
"author_email": "mitch@mitchbregs.com",
"download_url": "https://files.pythonhosted.org/packages/01/1c/a947fb1ec8919d4b4a55f13dd6a1046f95eb3d2fa9bcd5160f06ee43a9e0/pixian_ai-1.0.0.tar.gz",
"platform": null,
"description": "# pixian-ai\n\nPython SDK for [pixian.ai](https://pixian.ai/).\n\n## What is it?\n\nRemove image backgrounds.\n\n## Install\n\n```bash\n$ pip install pixian-ai\n```\n\n## Usage\n\n### Basic\n\n```python\nfrom pixian_ai import PixianAI\n\nclient = PixianAI(\n api_id=\"PIXIAN-AI-API-ID\",\n api_secret=\"PIXIAN-AI-API-SECRET\",\n)\nimg = client.remove_background(\"/path/to/input.jpeg\")\n\nimg.save(\"/path/to/output.jpeg\")\n```\n\nYou can also use:\n\n```python\nclient.remove_background(image_base64=\"base64encodedimage==\")\n\n# or\n\nclient.remove_background(image_url=\"https://imageurl.com/test.jpeg\")\n```\n\n### Advanced\n\n```python\nclient.remove_background(\n image_path=\"/path/to/image.jpeg\",\n max_pixels=100,\n background_color=\"#0055FF\"\n ...\n)\n```\n\nReference: [https://pixian.ai/api](https://pixian.ai/api#:~:text=uploading%20binary%20files.-,Parameters,-The%20input%20image)\n\nAll parameters described in the API spec above replace period (`.`) with underscore (`_`). For example, if the parameter is `background.color`, the SDK will use `background_color`.\n\n## Contributing\n\nFeel free to open a PR for any changes!\n\n## Testing\n\n```bash\n$ python -m unittest discover -s tests -p 'test_*.py'\n```\n\nMade with \u2764\ufe0f by [@mitchbregs](https://twitter.com/mitchbregs)\n",
"bugtrack_url": null,
"license": "",
"summary": "Python SDK for pixian.ai",
"version": "1.0.0",
"project_urls": {
"Homepage": "https://github.com/mitchbregs/pixian-ai"
},
"split_keywords": [
"pixian.ai",
"remove",
"background"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "58d78380eb1fbaa1ba246537d0ef2c2d66496737674df144ec0c34233771e335",
"md5": "42097cd22fdf86452cb6b8bf6436411e",
"sha256": "03fec04ce425b19e04cad58bf085d9e8085a77e54bdfcff3894534cff5789c10"
},
"downloads": -1,
"filename": "pixian_ai-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "42097cd22fdf86452cb6b8bf6436411e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">3.6",
"size": 5311,
"upload_time": "2023-11-07T15:39:55",
"upload_time_iso_8601": "2023-11-07T15:39:55.791750Z",
"url": "https://files.pythonhosted.org/packages/58/d7/8380eb1fbaa1ba246537d0ef2c2d66496737674df144ec0c34233771e335/pixian_ai-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "011ca947fb1ec8919d4b4a55f13dd6a1046f95eb3d2fa9bcd5160f06ee43a9e0",
"md5": "d5f2ee5a62130bcaf09bd224eb50d473",
"sha256": "ec5e6391684b70f67e0ce571a4d199dc6a3896b52cf189cf13e943b4bd895347"
},
"downloads": -1,
"filename": "pixian_ai-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "d5f2ee5a62130bcaf09bd224eb50d473",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">3.6",
"size": 5964,
"upload_time": "2023-11-07T15:39:56",
"upload_time_iso_8601": "2023-11-07T15:39:56.753637Z",
"url": "https://files.pythonhosted.org/packages/01/1c/a947fb1ec8919d4b4a55f13dd6a1046f95eb3d2fa9bcd5160f06ee43a9e0/pixian_ai-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-11-07 15:39:56",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "mitchbregs",
"github_project": "pixian-ai",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pixian-ai"
}