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.3.tar.gz (10.1 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.3-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: predictnow-api-client-0.0.3.tar.gz
  • Upload date:
  • Size: 10.1 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.3.tar.gz
Algorithm Hash digest
SHA256 170675a5115a1bbebecd3ce551a72487a17065f18d0196cb95bfad82c56301ef
MD5 039939dc1419c002d874e58ebbbda91e
BLAKE2b-256 1661a1fca78c61d8283c0449ad66a3212d22074248f0fd85813164c55dc3605e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: predictnow_api_client-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 8.6 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9430317376920550167cab2ce989ebfe8656adce9ac33c562867c63f87aad753
MD5 c7fd68f70be3dcee62c33f94b530a9df
BLAKE2b-256 a6cc68f83ef53a4d0fa2ae8e812020fe75490806eec13f41cb1d88a11c9bf888

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