Skip to main content

Banana Python SDK

Getting Started

Install via pip pip3 install banana-dev

Get your API Key

Run:

import banana_dev as banana

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"
}

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]

Release files for banana-dev 4.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for banana-dev 4.0.1
File Size Uploaded
banana_dev-4.0.1.tar.gz 3.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for banana-dev 4.0.1
File Interpreter ABI Platform
banana_dev-4.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 7.1 kB

Release files / banana_dev-4.0.1.tar.gz

Download URL banana_dev-4.0.1.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
088a0a454731172592e4b24493ed5e9bb1f4327c9bc2dfefcfdd69752071b9b9
BLAKE2b-256 checksum
How to use checksums
c67895039c4759f16826683102501e5da22bda4ac30d1789821db64372e293d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.15

Release files / banana_dev-4.0.1-py3-none-any.whl

Download URL banana_dev-4.0.1-py3-none-any.whl
Size 3.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
63eb780ec96e3673a091ddd90a789caaee9383925f0c6096780110dd06d7e499
BLAKE2b-256 checksum
How to use checksums
110d8700528ef7cebcb863456ae51b75b026b77c4315eb0854769879d993da90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.15

Release history Release notifications | RSS feed

6.3.0

2 release files

6.2.0

2 release files

6.1.0

2 release files

6.0.0

2 release files

5.1.0

2 release files

5.0.2

2 release files

5.0.1

2 release files

5.0.0

2 release files

4.0.2

2 release files

This release

4.0.1 This release

2 release files

4.0.0

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.0.0

2 release files

0.1.0

2 release files

0.0.2

2 release files

0.0.1

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page