# `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/93/1f/b9e8e1aa5d3b300159081005e20ea7a51b29f74c3f8188608aa31af7a78d/superb_ai_curate-1.3.1.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.3.1",
"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": "971660eb8bda2fc21f0b5a5337ae7dd9b99edbd4ed5f58a486ce0aa089fc9734",
"md5": "a1e9d9e8de2d89c9849c80410abf8081",
"sha256": "59239e64c41536ca71a5ded29c63a7062462052b212dc8d96053a10a14eca2f6"
},
"downloads": -1,
"filename": "superb_ai_curate-1.3.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a1e9d9e8de2d89c9849c80410abf8081",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.7",
"size": 39561,
"upload_time": "2024-05-27T07:09:53",
"upload_time_iso_8601": "2024-05-27T07:09:53.450997Z",
"url": "https://files.pythonhosted.org/packages/97/16/60eb8bda2fc21f0b5a5337ae7dd9b99edbd4ed5f58a486ce0aa089fc9734/superb_ai_curate-1.3.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "931fb9e8e1aa5d3b300159081005e20ea7a51b29f74c3f8188608aa31af7a78d",
"md5": "b39d36267966497bd29ed2c88e234a65",
"sha256": "c774f64ea9b54b6a89e0c3b66d5ec7ee3c902723d3598dd95d70273fdc253ad2"
},
"downloads": -1,
"filename": "superb_ai_curate-1.3.1.tar.gz",
"has_sig": false,
"md5_digest": "b39d36267966497bd29ed2c88e234a65",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.7",
"size": 33894,
"upload_time": "2024-05-27T07:09:55",
"upload_time_iso_8601": "2024-05-27T07:09:55.687579Z",
"url": "https://files.pythonhosted.org/packages/93/1f/b9e8e1aa5d3b300159081005e20ea7a51b29f74c3f8188608aa31af7a78d/superb_ai_curate-1.3.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-27 07:09:55",
"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"
}