Skip to main content

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.jpeg")

Advanced

client.remove_background(
    image_path="/path/to/image.jpeg",
    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


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-1.0.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pixian_ai-1.0.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file pixian_ai-1.0.0.tar.gz.

File metadata

  • Download URL: pixian_ai-1.0.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for pixian_ai-1.0.0.tar.gz
Algorithm Hash digest
SHA256 ec5e6391684b70f67e0ce571a4d199dc6a3896b52cf189cf13e943b4bd895347
MD5 d5f2ee5a62130bcaf09bd224eb50d473
BLAKE2b-256 011ca947fb1ec8919d4b4a55f13dd6a1046f95eb3d2fa9bcd5160f06ee43a9e0

See more details on using hashes here.

File details

Details for the file pixian_ai-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: pixian_ai-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for pixian_ai-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 03fec04ce425b19e04cad58bf085d9e8085a77e54bdfcff3894534cff5789c10
MD5 42097cd22fdf86452cb6b8bf6436411e
BLAKE2b-256 58d78380eb1fbaa1ba246537d0ef2c2d66496737674df144ec0c34233771e335

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page