Skip to main content

The official Python SDK to go along with Preflet.

Project description

# Preflet - Python SDK

Use this SDK to communicate with Preflet’s services to make your ML apps cloud native.

## Sample Code

from preflet import Model from preflet import generate_auth_token from preflet import list_all_models from preflet import get_model

# train_type defaults to “Classification” and can be “Multi-Class” or # “Regression” as well my_model = Model(“your_model_name”, trained_clf, train_type=”Multi-Class”)

my_model.calculate_metrics(y_test, predictions)

my_model.extract_metadata(x_train, y_train)

token = generate_auth_token(api_key=’your_api_key’)

# host can be ‘beta.preflet.com’ if you want to host it on the cloud, or # ‘localhost’ my_model.upload(token, host=’beta.preflet.com’)

# to get a list of all your models data = list_all_models(token, host=’beta.preflet.com’)

# get a specific model for normal use/batch-prediction downloaded_clf, details = get_model(“your_model_name”, token, host=’beta.preflet.com’)

# make predictions out of the box downloaded_clf.predict([…])

Project details


Release history Release notifications

Download files

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

Files for preflet, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size preflet-0.0.1-py2-none-any.whl (4.2 kB) File type Wheel Python version py2 Upload date Hashes View hashes
Filename, size preflet-0.0.1.tar.gz (3.9 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page