This package provides an iThenticate API Client for Python. You may also use this client for a Turnitin account, which uses the iThenticate API.
The easiest way to install is with pip.
$ pip install ithenticate-api-python
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
Use the folders
property to list all folders related to your account.
>>>> client.folders.all()
{
"data": [
{
'name': 'My Folder',
'group': None,
'id': 123456,
}
],
"messages": [],
"status": 200
}
Use the documents
property for all document related methods.
>>>> client.documents.all('1234567')
{
"data": [
{
'title': 'My Document',
'doc_id': 987654,
'author_first': 'John',
'author_last': 'Doe',
'is_pending': 1,
}
],
"messages": [],
"status": 200
}
>>>> 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
}
>>>> 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
}
The package is Python 3.x-compatible.
BSD (Berkeley Software Distribution) License. Copyright (c) 2017, Jorran de Wit.