Metadata-Version: 2.1
Name: curia
Version: 0.0.29
Summary: A library for training and using risk & impactability models on Curia
Home-page: https://github.com/FoundryAI/curia-python-sdk
Author: Curia.ai
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
Requires-Dist: importlib-metadata
Requires-Dist: ipykernel
Requires-Dist: numpy
Requires-Dist: pandas
Requires-Dist: requests
Requires-Dist: dynaconf
Requires-Dist: validation-decorators
Requires-Dist: scikit-learn
Requires-Dist: logzero
Requires-Dist: docutils
Requires-Dist: packaging
Provides-Extra: docs
Requires-Dist: sphinx-rtd-theme ; extra == 'docs'
Requires-Dist: sphinx ; extra == 'docs'
Requires-Dist: sphinxcontrib-apidoc ; extra == 'docs'
Provides-Extra: testing
Requires-Dist: pytest-cov ; extra == 'testing'
Requires-Dist: flake8 ; extra == 'testing'
Requires-Dist: pytest-pylint ; extra == 'testing'
Requires-Dist: pytest-mock ; extra == 'testing'

[![PyPI version](https://badge.fury.io/py/curia.svg)](https://badge.fury.io/py/curia)

[![Python 3.6](https://img.shields.io/badge/python-3.6-blue.svg)](https://www.python.org/downloads/release/python-360/)
[![Python 3.7](https://img.shields.io/badge/python-3.7-blue.svg)](https://www.python.org/downloads/release/python-370/)
[![Python 3.8](https://img.shields.io/badge/python-3.8-blue.svg)](https://www.python.org/downloads/release/python-380/)

[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=FoundryAI_curia-python-sdk&metric=alert_status&token=d5fecb91736894944e664dc8dcc119d19c73990a)](https://sonarcloud.io/dashboard?id=FoundryAI_curia-python-sdk)
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=FoundryAI_curia-python-sdk&metric=bugs&token=d5fecb91736894944e664dc8dcc119d19c73990a)](https://sonarcloud.io/dashboard?id=FoundryAI_curia-python-sdk)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=FoundryAI_curia-python-sdk&metric=coverage&token=d5fecb91736894944e664dc8dcc119d19c73990a)](https://sonarcloud.io/dashboard?id=FoundryAI_curia-python-sdk)
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=FoundryAI_curia-python-sdk&metric=sqale_rating&token=d5fecb91736894944e664dc8dcc119d19c73990a)](https://sonarcloud.io/dashboard?id=FoundryAI_curia-python-sdk)
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=FoundryAI_curia-python-sdk&metric=reliability_rating&token=d5fecb91736894944e664dc8dcc119d19c73990a)](https://sonarcloud.io/dashboard?id=FoundryAI_curia-python-sdk)
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=FoundryAI_curia-python-sdk&metric=security_rating&token=d5fecb91736894944e664dc8dcc119d19c73990a)](https://sonarcloud.io/dashboard?id=FoundryAI_curia-python-sdk)
[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=FoundryAI_curia-python-sdk&metric=vulnerabilities&token=d5fecb91736894944e664dc8dcc119d19c73990a)](https://sonarcloud.io/dashboard?id=FoundryAI_curia-python-sdk)

![Release](https://github.com/FoundryAI/curia-python-sdk/workflows/Release%20Workflow/badge.svg)

# Curia Python SDK
Curia Python SDK is a library for training and using risk & impactability models on Curia.

For detailed documentation, including the API reference, see our docs at https://foundryai.github.io/curia-python-sdk/.

### Installing the Curia Python SDK
The Curia Python SDK is built to PyPi and can be installed with pip as follows:
```
pip install curia
```

You can install from source by cloning this repository and running a pip install command in the root directory of the repository:
```
git clone https://github.com/FoundryAI/curia-python-sdk.git
cd curia-python-sdk
pip install .
```

##### Supported Operating Systems
Curia Python SDK supports Unix/Linux and Mac.

##### Supported Python Versions
Curia Python SDK is tested on:
- Python 3.6
- Python 3.7
- Python 3.8

##### Curia Permissions
Curia Python SDK will utilize the Curia Platform when training models and generating predictions. 
You will need access to the platform with appropriate permissions to fully utilize the SDK.

##### Running tests
Curia Python SDK has unit tests.
To run the tests:
```
python setup.py pytest
```

##### Building Sphinx docs
Curia Python SDK has Sphinx docs.
To build the docs run:
```
cd doc
make html
```

To preview the site with a Python web server:
```
cd docs/_build/html
python -m http.server 8000
```
View the docs by visiting http://localhost:8080

### Curia API Token
To use the Curia Python SDK you will need a Curia API Token. To access your API Token visit https://app.curia.ai/settings.

### Using the Curia Python SDK
```python
from curia.session import Session
from curia.risk import RiskModel
from curia.synthetic_data import generate_data

# Create synthetic data (demo/testing purposes only)
(X_train, X_test, _, _, y_train, y_test, _, _, _, _) = generate_data(binary_outcome=True)

# Create a session
curia_session = Session(api_token="YOUR_API_TOKEN")

# Instantiate a model
model = RiskModel(
    session=curia_session, 
    name="your-model-name",
    project_id="YOUR_PROJECT_ID"
)

# Train a model on the Curia Platform
model.train(features=X_train, label=y_train)

# Get predictions from your model on the Curia Platform
predictions = model.predict(features=X_test)
```



## TODO 
- docs badge

