bannerify is the Bannerify client for Python 3.8 and later. It returns errors as values, so a failed request does not raise an exception.
Install
- pip
- uv
Create a client
You need an API key. Create one on the API Keys page of the dashboard and keep it on the server.client.close() when you finish, or use the client as a context manager:
Generate an image
result["result"] holds the image bytes.
Methods
Create images and PDFs covers the first three, Render videos covers the video methods, and Signed URL covers the last one.
Handle errors
Every method exceptgenerate_image_signed_url returns a dict with a result key or an error key, and never both.
docs links to the page for that code, and you send requestId to support when you need help with a request. Errors lists the codes.
The SDK creates a few errors itself. They have code, message, and docs, but no requestId.
generate_image_signed_url returns a string and raises ValueError when the format is not supported.
Options
Modification models
A modification is a dict. You can also passModification models from bannerify, and the client converts them for you.