Skip to main content

A library for training and using risk & impactability models on Curia

Project description

PyPI version

Python 3.6 Python 3.7 Python 3.8

Quality Gate Status Bugs Coverage Maintainability Rating Reliability Rating Security Rating Vulnerabilities

Curia Python SDK

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

For detailed documenation, including the API reference, see our TODO - link to docs.

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

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

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

curia-0.0.27.tar.gz (19.8 kB view details)

Uploaded Source

Built Distribution

curia-0.0.27-py2.py3-none-any.whl (20.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file curia-0.0.27.tar.gz.

File metadata

  • Download URL: curia-0.0.27.tar.gz
  • Upload date:
  • Size: 19.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.0.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.9

File hashes

Hashes for curia-0.0.27.tar.gz
Algorithm Hash digest
SHA256 cc6b2e3e06f01feef55e883172924edfd068f0608b177b197e738143ae51bef1
MD5 4b01b1123d2ebd2b6b531368ab64b64a
BLAKE2b-256 6a770ae511bf3dd7959a569da254485098340fa77913e69627fe62bec8799533

See more details on using hashes here.

File details

Details for the file curia-0.0.27-py2.py3-none-any.whl.

File metadata

  • Download URL: curia-0.0.27-py2.py3-none-any.whl
  • Upload date:
  • Size: 20.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.0.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.9

File hashes

Hashes for curia-0.0.27-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a5776b9b56bb6c67a22b2584276d19e911e7cb8b135ddcd49e867aa0b8743658
MD5 bc844b9cd651061dfb87b3ff184cbabe
BLAKE2b-256 6a23e25cde010431e824770e72d5eb9f53a95adcd6793bcc0a6f7037372d31bd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page