Metadata-Version: 2.1
Name: datafold-sdk
Version: 0.0.5
Summary: The datafold SDK
Home-page: https://pypi.org/project/datafold-sdk
Author: Datafold
Author-email: hello@datafold.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click (<8.0,>=7.0)
Requires-Dist: requests (<3.0.0,>=2.20.0)
Requires-Dist: pydantic (<2.0.0,>=1.8.0)
Provides-Extra: dev
Requires-Dist: pre-commit ; extra == 'dev'
Requires-Dist: pytest ; extra == 'dev'
Requires-Dist: pytest-pep8 ; extra == 'dev'
Requires-Dist: pytest-cov ; extra == 'dev'

# datafold-sdk

An SDK library for the datafold application.

### Installation

First, create your virtual environment for python:

```shell
> python3 -m venv venv
> source venv/bin/activate
> pip install --upgrade pip setuptools wheel
```

Now, you're ready to install the datafold SDK:

```shell
> pip install datafold-sdk
```

### Datafold CLI

The datafold CLI is a utility that automates and simplifies certain tasks.
Help for using this utility is available in the utility itself:

```shell
> datafold --help
```

### Preliminary Datafold SDK

The Datafold SDK are python functions and classes that allow you to integrate
these CLI functions directly in your application source code.

In the future, the SDK will contain a more type-safe and integrated "API" client library,
which further facilitates integration with the datafold app server.

The only function currently implemented is the `submit_artifacts` function to upload
the `dbt run` artifacts to the app server:

```python
import os

from datafold.sdk.dbt import submit_artifacts

host = os.environ.get("DATAFOLD_HOST")
api_key = os.environ.get('DATAFOLD_APIKEY')

submit_artifacts(host=host,
                 api_key=api_key,
                 ci_config_id=1,
                 run_type='pull_request',
                 target_folder='<abs-path-to-dbt-target-folder>',
                 commit_sha='abcdef1234567890')
```


