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.2.tar.gz (8.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.2-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: predictnow-api-client-0.0.2.tar.gz
  • Upload date:
  • Size: 8.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.2.tar.gz
Algorithm Hash digest
SHA256 9b1e490a933e1d8f93c31e0ee2819e2f7c119dc8708ebaa49237fd23b1af28e4
MD5 df8f2cfbca408834aa3fb9b606c5ecb1
BLAKE2b-256 5d31c3e6a001988f985771428795821373d34efb648d46d7c57ef9d3415c5f20

See more details on using hashes here.

File details

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

File metadata

  • Download URL: predictnow_api_client-0.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bfc25ebe13432bfa7df7fba5a5a8b6f8edf9fc48bdffb1c793fd7549dc47443d
MD5 520ac2a992991b766e8a4ba4afc70943
BLAKE2b-256 a98a317b0f4dee70469c33c58b5aaaaca330889e78e04f56b1d3fd17f0ff399f

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