# `superb-ai-curate`
[![Coverage Status](https://coveralls.io/repos/github/Superb-AI-Suite/superb-ai-curate-python/badge.svg?branch=main)](https://coveralls.io/github/Superb-AI-Suite/superb-ai-curate-python?branch=main)
[![Version](https://img.shields.io/pypi/v/superb-ai-curate)](https://pypi.org/project/superb-ai-curate/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
## Overview
`superb-ai-curate` is the Python client for interacting with [Superb Curate](https://superb-ai.com/).
## Installation
You don't need this source code unless you want to modify the package. If you just want to use the package, just run:
```bash
$ pip install --upgrade superb-ai-curate
```
### Requirements
Python 3.7+
## Documentation
You can also find the documentation for `superb-ai-curate` [on the website](https://superb-ai-curate-python.readthedocs.io/en/latest/).
* [Introduction](https://superb-ai-curate-python.readthedocs.io/en/latest/intro/overview.html)
* [Installation](https://superb-ai-curate-python.readthedocs.io/en/latest/intro/install.html)
* [Tutorial](https://superb-ai-curate-python.readthedocs.io/en/latest/intro/tutorial.html)
## Usage
An Access Key is required to use the python client. This can be generated from the Settings > Access menu on the Superb AI Curate website. For more details on access key issuance and management, you can check the [Access Key Management](https://docs.superb-ai.com/reference/access-key-management) documentation. The Team Name refers to the organization name that your personal account belongs to.
```python
import spb_curate
from spb_curate import curate
spb_curate.access_key = "..."
spb_curate.team_name = "..."
dataset = curate.fetch_dataset(id="...")
images = [
curate.Image(
key="<unique image key>",
source=curate.ImageSourceLocal(asset="/path/to/image"),
metadata={"weather": "clear", "timeofday": "daytime"},
),
curate.Image(
key="<unique image key>",
source=curate.ImageSourceLocal(asset="/path/to/image"),
metadata={"weather": "clear", "timeofday": "daytime"},
),
]
job: curate.Job = dataset.add_images(images=images)
job.wait_until_complete()
```
### Configuring per-request
For use with multiple credentials, the requests can be configured at the function level.
```python
from spb_curate import curate
dataset = curate.fetch_dataset(access_key="...", team_name="...", id="...")
```
### Logging
If required, the client can be configured to produce basic logging output. There are two levels that are logged to, `INFO` and `DEBUG`. For production use, `INFO` is the recommended logging level, however `DEBUG` can be used for more verbosity.
There are several methods for setting the log level.
1. Environment variable
```bash
$ export SPB_LOG_LEVEL = "INFO"
```
2. Superb AI Curate Python client global setting
```python
import spb_curate
spb_curate.log_level = "INFO"
```
3. Python logging library
```python
import logging
logging.basicConfig()
logging.getLogger("superb-ai").setLevel(logging.INFO)
```
### Development
The development environment relies on [Poetry](https://python-poetry.org/) for package management, testing and building.
```bash
$ poetry install -E dev
$ poetry run pytest --cov=spb_curate tests
```
Raw data
{
"_id": null,
"home_page": "https://superb-ai.com/",
"name": "superb-ai-curate",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.7",
"maintainer_email": null,
"keywords": "superb ai, superbapi, tasks, categorization, annotation, labeling, dataops, mlops, curation",
"author": "Superb AI",
"author_email": "support@superb-ai.com",
"download_url": "https://files.pythonhosted.org/packages/65/8a/7c73c8835194362966629e7eb69fa741ccfb61527bf726b7ddc7b0e9e851/superb_ai_curate-1.4.1.post1.tar.gz",
"platform": null,
"description": "# `superb-ai-curate`\n\n[![Coverage Status](https://coveralls.io/repos/github/Superb-AI-Suite/superb-ai-curate-python/badge.svg?branch=main)](https://coveralls.io/github/Superb-AI-Suite/superb-ai-curate-python?branch=main)\n[![Version](https://img.shields.io/pypi/v/superb-ai-curate)](https://pypi.org/project/superb-ai-curate/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n\n## Overview\n\n`superb-ai-curate` is the Python client for interacting with [Superb Curate](https://superb-ai.com/).\n\n## Installation\n\nYou don't need this source code unless you want to modify the package. If you just want to use the package, just run:\n\n```bash\n$ pip install --upgrade superb-ai-curate\n```\n\n### Requirements\n\nPython 3.7+\n\n## Documentation\n\nYou can also find the documentation for `superb-ai-curate` [on the website](https://superb-ai-curate-python.readthedocs.io/en/latest/).\n\n* [Introduction](https://superb-ai-curate-python.readthedocs.io/en/latest/intro/overview.html)\n* [Installation](https://superb-ai-curate-python.readthedocs.io/en/latest/intro/install.html)\n* [Tutorial](https://superb-ai-curate-python.readthedocs.io/en/latest/intro/tutorial.html)\n\n## Usage\n\nAn Access Key is required to use the python client. This can be generated from the Settings > Access menu on the Superb AI Curate website. For more details on access key issuance and management, you can check the [Access Key Management](https://docs.superb-ai.com/reference/access-key-management) documentation. The Team Name refers to the organization name that your personal account belongs to.\n\n```python\nimport spb_curate\nfrom spb_curate import curate\n\nspb_curate.access_key = \"...\"\nspb_curate.team_name = \"...\"\n\ndataset = curate.fetch_dataset(id=\"...\")\n\nimages = [\n curate.Image(\n key=\"<unique image key>\",\n source=curate.ImageSourceLocal(asset=\"/path/to/image\"),\n metadata={\"weather\": \"clear\", \"timeofday\": \"daytime\"},\n ),\n curate.Image(\n key=\"<unique image key>\",\n source=curate.ImageSourceLocal(asset=\"/path/to/image\"),\n metadata={\"weather\": \"clear\", \"timeofday\": \"daytime\"},\n ),\n]\n\njob: curate.Job = dataset.add_images(images=images)\njob.wait_until_complete()\n\n```\n\n### Configuring per-request\n\nFor use with multiple credentials, the requests can be configured at the function level.\n\n```python\nfrom spb_curate import curate\n\ndataset = curate.fetch_dataset(access_key=\"...\", team_name=\"...\", id=\"...\")\n```\n\n### Logging\n\nIf required, the client can be configured to produce basic logging output. There are two levels that are logged to, `INFO` and `DEBUG`. For production use, `INFO` is the recommended logging level, however `DEBUG` can be used for more verbosity.\n\nThere are several methods for setting the log level.\n\n1. Environment variable\n\n```bash\n$ export SPB_LOG_LEVEL = \"INFO\"\n```\n\n2. Superb AI Curate Python client global setting\n\n```python\nimport spb_curate\n\nspb_curate.log_level = \"INFO\"\n```\n\n3. Python logging library\n\n```python\nimport logging\n\nlogging.basicConfig()\nlogging.getLogger(\"superb-ai\").setLevel(logging.INFO)\n```\n\n### Development\n\nThe development environment relies on [Poetry](https://python-poetry.org/) for package management, testing and building.\n\n```bash\n$ poetry install -E dev\n$ poetry run pytest --cov=spb_curate tests\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "The official Superb AI Curate client for Python",
"version": "1.4.1.post1",
"project_urls": {
"Documentation": "https://docs.superb-ai.com/reference/superb-curate-sdk-overview",
"Homepage": "https://superb-ai.com/",
"Repository": "https://github.com/Superb-AI-Suite/superb-ai-curate-python"
},
"split_keywords": [
"superb ai",
" superbapi",
" tasks",
" categorization",
" annotation",
" labeling",
" dataops",
" mlops",
" curation"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "57c920113b8362c83d2586dc53c04c70cd64bc7cdf5ac9635d3c488c838b8573",
"md5": "c57caecdfed14985880de1b060ede80d",
"sha256": "96b700b0daed083abb221966ecb1629e5c60e349b10c7cbb2d246ad96c2519e2"
},
"downloads": -1,
"filename": "superb_ai_curate-1.4.1.post1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c57caecdfed14985880de1b060ede80d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.7",
"size": 41417,
"upload_time": "2024-08-20T06:41:44",
"upload_time_iso_8601": "2024-08-20T06:41:44.608674Z",
"url": "https://files.pythonhosted.org/packages/57/c9/20113b8362c83d2586dc53c04c70cd64bc7cdf5ac9635d3c488c838b8573/superb_ai_curate-1.4.1.post1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "658a7c73c8835194362966629e7eb69fa741ccfb61527bf726b7ddc7b0e9e851",
"md5": "3a27f268488bc6b486ca6dfe63b3fd2f",
"sha256": "ee22ec90c54243e3309781d43118a6509ff40ff357b8c040897ef17fc3bc7e3c"
},
"downloads": -1,
"filename": "superb_ai_curate-1.4.1.post1.tar.gz",
"has_sig": false,
"md5_digest": "3a27f268488bc6b486ca6dfe63b3fd2f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.7",
"size": 128453,
"upload_time": "2024-08-20T06:41:46",
"upload_time_iso_8601": "2024-08-20T06:41:46.889107Z",
"url": "https://files.pythonhosted.org/packages/65/8a/7c73c8835194362966629e7eb69fa741ccfb61527bf726b7ddc7b0e9e851/superb_ai_curate-1.4.1.post1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-20 06:41:46",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Superb-AI-Suite",
"github_project": "superb-ai-curate-python",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "superb-ai-curate"
}