Skip to main content

Official Klasifikasi (https://klasifikasi.com) API Client Library

Project description

Klasifikasi for Python

Official Klasifikasi API Client Library

Installation

pip install klasifikasi-py

Quick start

You will need valid clientId & clientSecret of your model. You can get those from credential section at your model page, which is both unique per model

from klasifikasi import Klasifikasi

klasifikasi_instance = Klasifikasi(creds=[
  {
    'client_id': 'client_id',
    'client_secret': 'client_secret'
  }
])

You can pass multiple clientId & clientSecret too

from klasifikasi import Klasifikasi

klasifikasi_instance = Klasifikasi(creds=[
  {
    'client_id': 'client_id_1',
    'client_secret': 'client_secret_1'
  },
  {
    'client_id': 'client_id_2',
    'client_secret': 'client_secret_2'
  }
])

Classify

You need your model publicId to start classifying. You can get those from your model page, or you get get it from here :

models = klasifikasi_instance.get_models()
for publicId in models:
  print(publicId)

Classifying example :

result = klasifikasi_instance.classify('publicId', 'query')

Logs

You can get your classifying logs based on your model publicId

logs = klasifikasi_instance.classify('publicId', {
  'started_at': '1 December 2020',
  'ended_at': '2 December 2020',
  'skip': 0
  'take': 10
})

ended_at & started_at parameter is mandatory, the rest is optional

Error

All the function above will throw an Exception if something bad happen. Always run each function inside try & except block

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

klasifikasi_py-0.0.2-py3-none-any.whl (4.3 kB view hashes)

Uploaded Python 3

Supported by

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