aiobananas


Nameaiobananas JSON
Version 4.0.1.post2 PyPI version JSON
download
home_page
Summaryaiobananas is an async version of banana-dev
upload_time2022-12-20 22:09:17
maintainer
docs_urlNone
authorBennett Hoffman
requires_python>=3.10,<4.0
licenseMIT
keywords async aiobananas banana-dev sdk banana client
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Banana Python SDK

### Getting Started

Install via pip
`pip3 install aiobananas`

Get your API Key
- [Sign in / log in here](https://app.banana.dev)

Run:
```python
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:
```python
{
    "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:
```python
model_out = out["modelOutputs"][0]
```
            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "aiobananas",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10,<4.0",
    "maintainer_email": "",
    "keywords": "async,aiobananas,banana-dev,SDK,Banana client",
    "author": "Bennett Hoffman",
    "author_email": "benn.hoffman@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/67/73/092f0457e1dfcec1d0e0853f6a6b4187dd56f7b1fbcf76ad2fccd325ceaf/aiobananas-4.0.1.post2.tar.gz",
    "platform": null,
    "description": "# Banana Python SDK\n\n### Getting Started\n\nInstall via pip\n`pip3 install aiobananas`\n\nGet your API Key\n- [Sign in / log in here](https://app.banana.dev)\n\nRun:\n```python\nimport aiobananas\n\napi_key = \"demo\" # \"YOUR_API_KEY\"\nmodel_key = \"carrot\" # \"YOUR_MODEL_KEY\"\nmodel_inputs = {\n    # a json specific to your model. For example:\n    \"imageURL\":  \"https://demo-images-banana.s3.us-west-1.amazonaws.com/image2.jpg\"\n}\n\nasync with aiobananas.Session(api_key) as banana:\n    out = await banana.run(model_key, model_inputs)\n\n\n\nout = banana.run(api_key, model_key, model_inputs)\nprint(out)\n```\n\nReturn type:\n```python\n{\n    \"id\": \"12345678-1234-1234-1234-123456789012\", \n    \"message\": \"success\", \n    \"created\": 1649712752, \n    \"apiVersion\": \"26 Nov 2021\", \n    \"modelOutputs\": [\n        {\n            # a json specific to your model. In this example, the caption of the image\n            \"caption\": \"a baseball player throwing a ball\"\n        }\n    ]\n}\n```\n\nParse the server output:\n```python\nmodel_out = out[\"modelOutputs\"][0]\n```",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "aiobananas is an async version of banana-dev",
    "version": "4.0.1.post2",
    "split_keywords": [
        "async",
        "aiobananas",
        "banana-dev",
        "sdk",
        "banana client"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "e87029f0d3bdd38dfbb3bd3573cbdb2a",
                "sha256": "a220fe98ee0573f614ccdc9eecf862d1b06e7ceced8347fc3815a9689d43964e"
            },
            "downloads": -1,
            "filename": "aiobananas-4.0.1.post2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e87029f0d3bdd38dfbb3bd3573cbdb2a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10,<4.0",
            "size": 4176,
            "upload_time": "2022-12-20T22:09:16",
            "upload_time_iso_8601": "2022-12-20T22:09:16.306708Z",
            "url": "https://files.pythonhosted.org/packages/fc/3a/3f72e2ac4411a6383994a186649c3aaf517902c2415c13d3c68151111b58/aiobananas-4.0.1.post2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "f9bb4c8c1b9b4ee24cec7fe13961a87f",
                "sha256": "4d57a8c9817d8f1f0562d7c52eee668c165f7f7505b8df81fd33f27c8229de43"
            },
            "downloads": -1,
            "filename": "aiobananas-4.0.1.post2.tar.gz",
            "has_sig": false,
            "md5_digest": "f9bb4c8c1b9b4ee24cec7fe13961a87f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10,<4.0",
            "size": 4025,
            "upload_time": "2022-12-20T22:09:17",
            "upload_time_iso_8601": "2022-12-20T22:09:17.841008Z",
            "url": "https://files.pythonhosted.org/packages/67/73/092f0457e1dfcec1d0e0853f6a6b4187dd56f7b1fbcf76ad2fccd325ceaf/aiobananas-4.0.1.post2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-20 22:09:17",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "aiobananas"
}
        
Elapsed time: 0.07574s