Skip to content

Python API Client for iThenticate, a professional plagiarism detection and prevention technology.

License

Notifications You must be signed in to change notification settings

JorrandeWit/ithenticate-api-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

iThenticate API Client Python

This package provides an iThenticate API Client for Python. You may also use this client for a Turnitin account, which uses the iThenticate API.

PyPI version

Installation

The easiest way to install is with pip.

$ pip install ithenticate-api-python

Getting started

Requiring the iThenticate API Client.

>>>> import iThenticate

Initializing the iThenticate API client and login.

>>>> client = iThenticate.API.Client('test_username', 'test_password')
>>>> client.login()
True

Method reference

Folders

Use the folders property to list all folders related to your account.

List all folders

folders.all()
>>>> client.folders.all()
{
  "data": [
    {
      'name': 'My Folder',
      'group': None,
      'id': 123456,
    }
  ],
  "messages": [],
  "status": 200
}

Documents

Use the documents property for all document related methods.

Get all documents

documents.all(folder_id)
>>>> client.documents.all('1234567')
{
  "data": [
    {
      'title': 'My Document',
      'doc_id': 987654,
      'author_first': 'John',
      'author_last': 'Doe',
      'is_pending': 1,
    }
  ],
  "messages": [],
  "status": 200
}

Submit a document

documents.add(path, folder_id, author_first_name, author_last_name, document_title)
>>>> client.documents.add('/absolute/path/to/document.pdf', '123456', 'John', 'Doe', 'Document Title')
{
  "data": [
    {
      'filename': 'document.pdf',
      'id': 123456,
    }
  ],
  "messages": [
    'Uploaded 1 document successfully'
  ],
  "status": 200
}

Get document status

documents.get(path, document_id)
>>>> client.documents.get('123456')
{
  "data": [
    {
        'id': 123456,
        'title': 'Beautiful Dummy Document',
        'uploaded_time': '2008-06-05T15:13:11',
        'author_last': 'Doe',
        'author_first': 'John',
        'percent_match': 73,
        'is_pending': 1,
        'processed_time': '2008-06-05T15:30:02',
    }
  ],
  "messages": [],
  "status": 200
}

Support

The package is Python 3.x-compatible.

License

BSD (Berkeley Software Distribution) License. Copyright (c) 2017, Jorran de Wit.

About

Python API Client for iThenticate, a professional plagiarism detection and prevention technology.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages