Metadata-Version: 2.1
Name: superannotate-databricks-connector
Version: 0.0.2.dev1
Summary: Custom functions to work with SuperAnnotate in Databricks
Author-email: Leo Lindén <leo@superannotate.com>
Maintainer-email: Leo Lindén <leo@superannotate.com>
License: MIT License
        
        Copyright (c) 2023 SuperAnnotate AI Inc.
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/superannotateai/superannotate-databricks-connector
Project-URL: Bug Reports, https://github.com/superannotateai/superannotate-databricks-connector/issues
Project-URL: Source, https://github.com/superannotateai/superannotate-databricks-connector/
Keywords: superannotate_databricks_connector,superannotate
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Build Tools
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: pyspark (~=3.4.0)
Provides-Extra: test
Requires-Dist: pytest ; extra == 'test'

# Superannotate Databricks Connector
SuperAnnotate is the cornerstone of your data labeling pipeline. It brings you a cutting-edge annotation tool for all types of data including image, video, text, LiDAR, audio, and more.

This Python package provides a set of utilities for working with SuperAnnotate data on Databricks. It includes functionality to process SuperAnnotate data and save it to Delta tables.


### Features
Convert superannotate annotation data to Apache Spark&trade; Data Frames. 
Project types supported:
    - Vector
    - Text



### Example notebooks.
Copy the notebooks in the demo folder to your databricks workspace to get started with SuperAnnotate quickly!

### Installation
```bash
pip install superannotate_databricks_connector
``` 

### Tests

Run tests by building the Dockerfile.test file using

```bash
docker build -f Dockerfile.test -t test_package .
```

If you are running the tests for the first you first have to build the base dockerfile containing pyspark.

```bash
docker build -f Dockerfile.spark -t spark_docker_base .
```

### Build package

In the main directory, run the following to generate a .whl file. 

```bash
python -m build
```

### Usage
First import the required function

```python
from superannotate_databricks_conector.vector import get_vector_dataframe
from superannotate import SAClient
```

You can then convert your annotations to a spark dataframe

```python
sa = SAClient(token="<TOKEN>")
annotations = sa.get_annotations("<PROJECT_NAME>)
df = get_vector_dataframe(annotations, spark)
```


