Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

adapapi

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

adapapi - npm Package Compare versions

Comparing version
0.0.3
to
0.0.4
+1
-1
adapapi.egg-info/PKG-INFO
Metadata-Version: 2.1
Name: adapapi
Version: 0.0.3
Version: 0.0.4
Summary: A simple Python package using Appen API

@@ -5,0 +5,0 @@ Home-page: UNKNOWN

@@ -68,2 +68,18 @@ import requests

def split_column(self, job_id, columnname, character):
"""Corresponds to the "Split Column" button in platform UI. This operation will split the contents of a column on a certain character, transforming strings into arrays of strings.
Args:
job_id (int): ADAP Job ID
columnname (str): Column name
character (str): Delimiting character
"""
params = {'key': self.api_key, 'on': columnname, 'with': character}
response = requests.get(f'https://api.appen.com/v1/jobs/{job_id}/units/split', params=params)
if response.status_code != 200:
log.error(f'---- Status code: {response.status_code} \n {response.text}')
else:
log.info(json.loads(response.text))
def job_json(self, job_id):

@@ -85,3 +101,3 @@ """Get job json

def duplicate_job(self, job_id, include_uploaded_rows=False):
def duplicate_job(self, job_id, include_uploaded_rows=False, include_tq=False):
"""Duplicate ADAP job

@@ -91,3 +107,4 @@

job_id (int): ADAP Job ID
include_uploaded_rows (bool): Flag to include previously uploaded rows. Default set to False.
include_uploaded_rows (bool): Flag to include previously uploaded rows. Includes test questions if present. Default set to False.
include_tq (bool): Flag to include test questions only.

@@ -97,3 +114,3 @@ Returns:

"""
params = {'key': self.api_key, 'all_units': str(include_uploaded_rows).lower()}
params = {'key': self.api_key, 'all_units': str(include_uploaded_rows).lower(), 'gold': str(include_tq).lower()}
response = requests.get(f'https://api.appen.com/v1/jobs/{job_id}/copy.json', params=params)

@@ -261,3 +278,3 @@ if response.status_code != 200:

break
time.sleep(1)
time.sleep(30)
response = requests.get(f'https://api.appen.com/v1/jobs/{job_id}.csv', params=params)

@@ -267,3 +284,3 @@ while not response.ok:

response = requests.get(f'https://api.appen.com/v1/jobs/{job_id}.csv', params=params)
time.sleep(1)
time.sleep(30)

@@ -333,3 +350,3 @@ time_end = timeit.default_timer()

break
time.sleep(1)
time.sleep(30)
response = requests.get(f'https://api.appen.com/v1/jobs/{jid}.csv', params=params)

@@ -339,3 +356,3 @@ while not response.ok:

response = requests.get(f'https://api.appen.com/v1/jobs/{jid}.csv', params=params)
time.sleep(1)
time.sleep(30)

@@ -342,0 +359,0 @@ fname = f'{params["type"]}_{jid}.zip'

Metadata-Version: 2.1
Name: adapapi
Version: 0.0.3
Version: 0.0.4
Summary: A simple Python package using Appen API

@@ -5,0 +5,0 @@ Home-page: UNKNOWN

@@ -5,3 +5,3 @@ from setuptools import setup, find_packages

name='adapapi',
version='0.0.3',
version='0.0.4',
description='A simple Python package using Appen API',

@@ -8,0 +8,0 @@ long_description_content_type='text/markdown',