# Banana Python SDK
Please see our usage docs in the official [Banana Documentation](https://docs.banana.dev/banana-docs/core-concepts/sdks/python)
## Developing on the SDK
Set up the environment and install the package in editable mode
```bash
python -m venv .venv
source .venv/bin/activate
pip install -e ./
```
Set up a test directory to play around with the changes
```bash
mkdir tests
cd tests
touch test.py
```
Create some script
```python
from banana_dev import API
api = API("11111111-1111-1111-1111-111111111111")
projects, status = api.list_projects()
print('list', projects, status)
project, status = api.get_project(projects["results"][0]["id"])
print('get', project, status)
updated_project, status = api.update_project(projects["results"][0]["id"], {"maxReplicas": 2})
print('update', updated_project, status)
```
Run it
```bash
python test.py
```
Raw data
{
"_id": null,
"home_page": "https://www.banana.dev",
"name": "banana-dev",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "Banana client,API wrapper,Banana,SDK",
"author": "Erik Dunteman",
"author_email": "erik@banana.dev",
"download_url": "https://files.pythonhosted.org/packages/f5/a7/48416129ecf3a78dab0b3007dbf2cd991d2852f99205f08f5d7208da276b/banana_dev-6.3.0.tar.gz",
"platform": null,
"description": "# Banana Python SDK\n\nPlease see our usage docs in the official [Banana Documentation](https://docs.banana.dev/banana-docs/core-concepts/sdks/python)\n\n## Developing on the SDK\n\nSet up the environment and install the package in editable mode\n```bash\npython -m venv .venv\nsource .venv/bin/activate\npip install -e ./\n```\n\nSet up a test directory to play around with the changes\n```bash\nmkdir tests\ncd tests\ntouch test.py\n```\n\nCreate some script\n```python\nfrom banana_dev import API\n\napi = API(\"11111111-1111-1111-1111-111111111111\")\nprojects, status = api.list_projects()\nprint('list', projects, status)\n\nproject, status = api.get_project(projects[\"results\"][0][\"id\"])\nprint('get', project, status)\n\nupdated_project, status = api.update_project(projects[\"results\"][0][\"id\"], {\"maxReplicas\": 2})\nprint('update', updated_project, status)\n```\n\nRun it\n```bash\npython test.py\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "The banana package is a python client to interact with your machine learning models hosted on Banana",
"version": "6.3.0",
"project_urls": {
"Homepage": "https://www.banana.dev"
},
"split_keywords": [
"banana client",
"api wrapper",
"banana",
"sdk"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4d1eea473de6647ab4fddbd683a3047c8c377c5d99bc628db868d787ba7d9ed8",
"md5": "4966612fe70a10ea59a7c3e78292e84a",
"sha256": "d85dd3e769eeb66da6c2e40364bba9fdf89e853a1e78b1de24252effdfba0e03"
},
"downloads": -1,
"filename": "banana_dev-6.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4966612fe70a10ea59a7c3e78292e84a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 6287,
"upload_time": "2023-11-03T22:17:15",
"upload_time_iso_8601": "2023-11-03T22:17:15.717279Z",
"url": "https://files.pythonhosted.org/packages/4d/1e/ea473de6647ab4fddbd683a3047c8c377c5d99bc628db868d787ba7d9ed8/banana_dev-6.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f5a748416129ecf3a78dab0b3007dbf2cd991d2852f99205f08f5d7208da276b",
"md5": "4932677ce58e2d169c0ef0842200a1a7",
"sha256": "39ff73163f7c7aa881ea27a64d03b9331d2f43acf11825c02544f437878933c3"
},
"downloads": -1,
"filename": "banana_dev-6.3.0.tar.gz",
"has_sig": false,
"md5_digest": "4932677ce58e2d169c0ef0842200a1a7",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3731,
"upload_time": "2023-11-03T22:17:17",
"upload_time_iso_8601": "2023-11-03T22:17:17.645816Z",
"url": "https://files.pythonhosted.org/packages/f5/a7/48416129ecf3a78dab0b3007dbf2cd991d2852f99205f08f5d7208da276b/banana_dev-6.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-11-03 22:17:17",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "banana-dev"
}