Skip to main content

A restful client library, designed to access predictnow restful api.

Project description

Usage:

from predictnow.pdapi import PredictNowClient

Setup client along with its api key

api_key = "<YOUR_API_KEY>" client = PredictNowClient(api_key)

Train demo

train_input_path = 'C:/Users/devstack/Documents/example_input_train.csv' train_params = { "username": "welly", "email": "welly@predictnow.ai", "label": "futreturn", "timeseries": "yes", "type": "classification", "feature_selection": "shap", "analysis": "small", "boost": "gbdt", "mode": "train", "testsize": "0.2", "weights": "no", "prob_calib": "no", "suffix": "myfirstsuffix", "eda": "no", }

response = client.train(train_input_path, train_params) print(response)

Predict demo

live_input_path = 'C:/Users/devstack/Documents/example_input_live.csv' username = train_params["username"] suffix = train_params["suffix"] path = "../" + train_params["username"] predict_params = { "username": username, "model_name": "saved_model_" + suffix + ".pkl", # TODO proper model name "eda": "no", } response = client.predict(live_input_path, params=predict_params) print(response)

Save Result demo

response = client.save_to_output({"username": "welly", "output": "C:/Users/devstack/Documents"}) print(response)

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

predictnow-api-client-0.0.1.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

predictnow_api_client-0.0.1-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file predictnow-api-client-0.0.1.tar.gz.

File metadata

  • Download URL: predictnow-api-client-0.0.1.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

File hashes

Hashes for predictnow-api-client-0.0.1.tar.gz
Algorithm Hash digest
SHA256 2f0acbc309e0cedabbf95236743dff36d09d2c6447aed18e4246572add970d06
MD5 26b6cf6d80d6b4cfbf3a02675e50a8fa
BLAKE2b-256 4d59dca8c99746a182b2b43cc374765ccb9f8b88d86f8bbfc482c5c08c52ae9d

See more details on using hashes here.

File details

Details for the file predictnow_api_client-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: predictnow_api_client-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

File hashes

Hashes for predictnow_api_client-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 11ed823800c7c553379b05b5dc76a2ba23147694d040a72d8628231a44a5f637
MD5 d64a7f562cae2fe3dfdd10b2f14a167b
BLAKE2b-256 a825def204c47c09949d5e94cc795923d8980ef218df411ca501a99ee13c9e84

See more details on using hashes here.

Supported by

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