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


Download files

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

Source Distribution

preflet-0.0.1.tar.gz (3.9 kB view hashes)

Uploaded source

Built Distribution

preflet-0.0.1-py2-none-any.whl (4.2 kB view hashes)

Uploaded py2

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page