aiobananas is an async version of banana-dev
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
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.post1.tar.gz.
File metadata
- Download URL: aiobananas-4.0.1.post1.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.1 CPython/3.10.6 Linux/5.15.79.1-microsoft-standard-WSL2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
942aaac82192099174fb42f9bb6f44b4efff6e625c02dd0d22168121e87b52e1
|
|
| MD5 |
13d187a850395a9e51de1a588a465949
|
|
| BLAKE2b-256 |
7117e8ca18d38c3d456988573a155f75271676323d375c310e3a7181ad9ae8d3
|
File details
Details for the file aiobananas-4.0.1.post1-py3-none-any.whl.
File metadata
- Download URL: aiobananas-4.0.1.post1-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.1 CPython/3.10.6 Linux/5.15.79.1-microsoft-standard-WSL2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e7450a8c9f7bf25eb0f81acc8f49d1563e1c00f5003e69826a3e635493afd6f
|
|
| MD5 |
5a4a595c96494da3537e4130d89f95b0
|
|
| BLAKE2b-256 |
2dd8b2169cbda5ca93178b6c61b2dfdd4ed16056392d960a8c38fe6db08177eb
|