Skip to content
Python SDK for GroupDocs Classification for Cloud
Python Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
TestData/Common
groupdocsclassificationcloud
test
.gitignore
.travis.yml
LICENSE
README.md
requirements.txt
setup.py
test-requirements.txt
test.sh
tox.ini

README.md

groupdocs-classification-cloud-python

This repository contains GroupDocs.Classification Cloud SDK for Python source code. This SDK allows you to work with GroupDocs.Classification Cloud REST APIs in your Python applications quickly and easily, with zero initial cost.

Key Features

  • Classification of texts
  • Classification of documents

See API Reference for full API specification.

How to use the SDK?

The complete source code is available in this repository folder. You can either directly use it in your project via source code or get PyPi (recommended). For more details, please visit our documentation website.

Prerequisites

To use GroupDocs.Classification Cloud Python SDK you need to register an account with GroupDocs Cloud and lookup/create App Key and SID at Cloud Dashboard. There is free quota available. For more details, see GroupDocs Cloud Pricing.

Installation & Usage

pip install groupdocsclassificationcloud

If the python package is hosted on Github, you can install directly from Github

pip install groupdocsclassificationcloud

(you may need to run pip with root permission: sudo pip install groupdocsclassificationcloud)

Then import the package:

import groupdocsclassificationcloud

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import groupdocsclassificationcloud

Getting Started

Please follow the installation procedure and then run the following:

import os
from groupdocsclassificationcloud.configuration import Configuration
from groupdocsclassificationcloud.apis.classification_api import ClassificationApi, classify_request
from groupdocsclassificationcloud.models import BaseRequest


class Classification(object):
    APP_SID = '' # Put your appSid here
    APP_KEY = '' # Put your appKey here

    def __init__(self):
        self.classification_api = ClassificationApi(configuration=Configuration(Classification.APP_SID,
                                                                                Classification.APP_KEY))

    # Classify text with IAB-2 taxonomy (Default)
    def classify_raw_text(self):
        request = classify_request(BaseRequest("Try text classification"))

        result = self.classification_api.classify(request)
        print("Result {}".format(result))


classification = Classification()
classification.classify_raw_text()

Test contain various examples of using the SDK. Please put your credentials into Configuration.

Dependencies

  • Python 2.7 and 3.4+
  • referenced packages (see here for more details)

Contact Us

Your feedback is very important to us. Please feel free to contact us using our Support Forums.

You can’t perform that action at this time.