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.5.tar.gz (11.3 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.5-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: predictnow-api-client-0.0.5.tar.gz
  • Upload date:
  • Size: 11.3 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.5.tar.gz
Algorithm Hash digest
SHA256 8db60093333f7cb6c609b95b7ca2051ae9cef4203f62d8d02804d8eb7ee933ab
MD5 c7984713c6bcc9f30da7fc29db8ad7d8
BLAKE2b-256 b724cb21fd00333f2835acdaecd226e01ca14c416a3b02640afa9a1688840da9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: predictnow_api_client-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 9.8 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 35ceb5abae2966415640381e3c437e762915929b72fdb155d3300198c04286b5
MD5 64e2d82cd7196ee25f134f6d4e457fff
BLAKE2b-256 c9c3db0337712aa08d8ab40ffc15ac305d1571398a60761de91c8c6feffbf5fe

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