aiobananas is an async version of banana-dev
Reason this release was yanked:
Game breaking bugs
Project description
Banana Python SDK
Getting Started
Install via pip
pip3 install aiobananas
Get your API Key
Run:
import aiobananas
api_key = "demo" # "YOUR_API_KEY"
model_key = "carrot" # "YOUR_MODEL_KEY"
model_inputs = {
# a json specific to your model. For example:
"imageURL": "https://demo-images-banana.s3.us-west-1.amazonaws.com/image2.jpg"
}
async with aiobananas.Session(api_key) as banana:
out = await banana.run(model_key, model_inputs)
out = banana.run(api_key, model_key, model_inputs)
print(out)
Return type:
{
"id": "12345678-1234-1234-1234-123456789012",
"message": "success",
"created": 1649712752,
"apiVersion": "26 Nov 2021",
"modelOutputs": [
{
# a json specific to your model. In this example, the caption of the image
"caption": "a baseball player throwing a ball"
}
]
}
Parse the server output:
model_out = out["modelOutputs"][0]
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
aiobananas-4.0.1.tar.gz
(3.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aiobananas-4.0.1.tar.gz.
File metadata
- Download URL: aiobananas-4.0.1.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.0 CPython/3.10.6 Linux/5.15.79.1-microsoft-standard-WSL2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c44a5d74086729921736e43a79be88ee6d38f63da5a10df607dcecc1e30c827
|
|
| MD5 |
fd1dbecc23bc9c121698a51ef3317f55
|
|
| BLAKE2b-256 |
eff2a84d115092ee5031cb54840b55c0d637e6215a8189c833ac671737f389cc
|
File details
Details for the file aiobananas-4.0.1-py3-none-any.whl.
File metadata
- Download URL: aiobananas-4.0.1-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.0 CPython/3.10.6 Linux/5.15.79.1-microsoft-standard-WSL2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
39531f1a7b09071864c43e9e775e9258ec88166d522023213338f78999ba3b53
|
|
| MD5 |
b557f2cdc836bef9244603e5a7620da3
|
|
| BLAKE2b-256 |
5ebdeac76dd824a24632691b6784d3386b123f8f3b0efc043459fcd123212c8a
|