Skip to main content

This SDK aims to provide customers with a range of features to simplify order management, dataset processing, and data acceptance.

Project description

Overview

Welcome to the project description of the Customer Service Python SDK. This SDK aims to provide customers with a range of features to simplify order management, dataset processing, and data acceptance. Through our SDK, you can integrate the following services into your Python applications.

Customer Service

Our customer service system offers a comprehensive set of APIs for querying orders and detailed information about the delivery batches under an order.

Dataset Services

Dataset services allow users to upload, download, and view datasets.

Data Acceptance Services

Data acceptance supports customers to accept annotated data according to rules and requirements. We also support viewing the acceptance list, detailed information, and acceptance details in the data acceptance section to help users customers that their orders and datasets meet specific business standards and compliance requirements.

Prerequisites

  • Python 3.6+ (It is recommended to use Python 3.6 or higher)
  • pip (Python's package manager)

Installation

Install the customerService Python SDK using pip:

  pip install nexdata-customer-system-x.x.x

Configuration

Before using the SDK, some basic configurations are required, including obtaining AppKey and AppSecret, and binding callback links.

Obtain AppKey and AppSecret

  1. Log in to the customer service system.
  2. Go to Personal Center - Application Credentials.
  3. Create a new key at "AppKey" and "AppSecret".

Configure the SDK

Configure the keys in the code:

from customerService.auth import Auth
auth = Auth(app_key='your-app-key', app_secret='your-app-secret')

Quick Start

Here is an example of how to use the Customer Service Python SDK for basic operations.

Initialize the Client

from customerService.auth import Auth
auth = Auth(app_key='your-app-key', app_secret='your-app-secret')

Query Datasets

from customerService.datasets import Datasets
from customerService.page_params import PageParams

dataset = Datasets(auth)
page = PageParams()
json = dataset.dataset_list(dataset_state='state', page=page)

Create a Dataset

from customerService.datasets import Datasets

dataset = Datasets(auth)
dataset.create_dataset(dataset_name='name', order_ids='orderId', storage_area='area')

Get a Dataset

from customerService.datasets import Datasets

dataset = Datasets(auth)
json = dataset.dataset_info(dataset_id='dataset_id')

Update a Dataset

from customerService.datasets import Datasets

dataset = Datasets(auth)
json = dataset.update_dataset(dataset_id='dataset_id', dataset_name='dataset_name', 
add_order_ids='add_order_ids', remove_order_ids='remove_order_ids')

Delete a Dataset

from customerService.datasets import Datasets

dataset = Datasets(auth)
json = dataset.delete_dataset(dataset_id='dataset_id')

Pagination Handling

from customerService.datasets import Datasets
from customerService.page_params import PageParams

dataset = Datasets(auth)
page = PageParams()
page.page_size = 10
page.page = 1
json = dataset.dataset_list(dataset_state='dataset_state', page=page)

DataSet Upload

from customerService.auth import Auth
from customerService.datasets import DatasetBatchs, Datasets
from customerService.upload import Upload

dataset = Datasets(auth)
dataset_id = dataset.create_dataset(dataset_name='upload_name' + 'dataset_name', 
order_ids='order_id', storage_area='storage_area')['responseObject']
batchs = DatasetBatchs(auth)
batch_id = batchs.create_dataset_batch(dataset_id=dataset_id, batch_name=batch_name, comment='')['responseList'][0]['batchId']
upload = Upload(auth=auth, dataset_id=dataset_id, batch_id=batch_id, file_path='your_file_path' ,region='your_storage_area', block_size = 100)
upload.execute()

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 Distributions

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file nexdata_customer_system-1.0.4-202604141141-py3-none-any.whl.

File metadata

File hashes

Hashes for nexdata_customer_system-1.0.4-202604141141-py3-none-any.whl
Algorithm Hash digest
SHA256 8f54d3c8f837ee37971db4b2164671e18924901849dac9ec3c7a5cb9a5da2ccc
MD5 6b4390c9961bdbc704bb4ec1b32db1fd
BLAKE2b-256 fcfc7993af5f24a6f530dd2adbc3b929f1c3fc307725d1aec0a78125eafb7b5e

See more details on using hashes here.

File details

Details for the file nexdata_customer_system-1.0.4-202604141103-py3-none-any.whl.

File metadata

File hashes

Hashes for nexdata_customer_system-1.0.4-202604141103-py3-none-any.whl
Algorithm Hash digest
SHA256 d547530efc93a4b1f1d3f55eb464104f4bf1344a8ed3c588142aa53385932253
MD5 cbe07e970ff0df69cb8617c645c29a93
BLAKE2b-256 e0e85939cdfdaae83551211a10d4b2d93972291067c18472cbd28fe7c963af40

See more details on using hashes here.

Supported by

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