Python SDK for pixian.ai
Project description
pixian-ai
Python SDK for pixian.ai.
What is it?
Remove image backgrounds.
Install
$ pip install pixian-ai
Usage
Basic
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:
client.remove_background(image_base64="base64encodedimage==")
# or
client.remove_background(image_url="https://imageurl.com/test.jpg")
Advanced
client.remove_background(
image_path="/path/to/image",
max_pixels=100,
background_color="#0055FF"
...
)
Reference: https://pixian.ai/api
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
$ python -m unittest discover -s tests -p 'test_*.py'
Made with ❤️ by @mitchbregs
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pixian_ai-0.0.1.tar.gz
(6.0 kB
view hashes)
Built Distribution
Close
Hashes for pixian_ai-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9c92d8ca1d8ff3cb2486d08bf9defd6514c1c9689fa979d24939c4dad728ed5 |
|
MD5 | 96f4363f630477310b628db40e9b69e0 |
|
BLAKE2b-256 | 2dc5a75156e4666886fbf74c19a13a4cf5bb889059a79b5ec990f542448607ba |