Skip to main content

tachain-sdk

Public integration endpoints. Set your own base URL and credential before calling.

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • Package version: 0.1.0
  • Generator version: 7.25.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python 3.10+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/ta-chain/tachain-sdk.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/ta-chain/tachain-sdk.git)

Then import the package:

import tachain_sdk

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 tachain_sdk

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import tachain_sdk
from tachain_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.example.com
# See configuration.py for a list of all supported configuration parameters.
configuration = tachain_sdk.Configuration(
    host = "https://api.example.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKey
configuration.api_key['ApiKey'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'

# Configure API key authorization: Signature
configuration.api_key['Signature'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Signature'] = 'Bearer'

# Configure Bearer authorization: BearerToken
configuration = tachain_sdk.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Configure API key authorization: Timestamp
configuration.api_key['Timestamp'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Timestamp'] = 'Bearer'


# Enter a context with an instance of the API client
with tachain_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = tachain_sdk.ApiDeclarationApi(api_client)
    x_credential_type = 'x_credential_type_example' # str | Use 'Token' with bearer authorization, or 'API Key' with signed API key headers. This header is mandatory in the deployed API.
    attachment_id = 'attachment_id_example' # str | query 方式传入的单个附件申报 ID。 (optional)
    form_data_id = 'form_data_id_example' # str | query 方式传入的单个表单申报 ID。 (optional)
    tactic_chain_api_service_controllers_api_integration_v1_api_declaration_delete_request = tachain_sdk.TacticChainApiServiceControllersApiIntegrationV1ApiDeclarationDeleteRequest() # TacticChainApiServiceControllersApiIntegrationV1ApiDeclarationDeleteRequest |  (optional)

    try:
        # 申报信息删除接口。
        api_response = api_instance.delete_v1_declaration_delete(x_credential_type, attachment_id=attachment_id, form_data_id=form_data_id, tactic_chain_api_service_controllers_api_integration_v1_api_declaration_delete_request=tactic_chain_api_service_controllers_api_integration_v1_api_declaration_delete_request)
        print("The response of ApiDeclarationApi->delete_v1_declaration_delete:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling ApiDeclarationApi->delete_v1_declaration_delete: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://api.example.com

Class Method HTTP request Description
ApiDeclarationApi delete_v1_declaration_delete DELETE /v1/declaration/Delete 申报信息删除接口。
ApiDeclarationApi get_v1_declaration_list_paging GET /v1/declaration/ListPaging 申报信息查询接口。
ApiDeclarationApi get_v1_declaration_required_documents GET /v1/declaration/RequiredDocuments 单据所需申报信息查询接口。
ApiDeclarationApi post_v1_declaration_submit POST /v1/declaration/Submit 申报文件/表单提交接口。
ApiDeliveryApi delete_v1_delivery_delete DELETE /v1/delivery/Delete 删除发货单。
ApiDeliveryApi get_v1_delivery_list_paging GET /v1/delivery/ListPaging 查询发货单信息及明细信息。
ApiDeliveryApi get_v1_delivery_receipt_list_paging GET /v1/delivery/ReceiptListPaging 查询收货单集合,核对收货信息。
ApiDeliveryApi post_v1_delivery_create POST /v1/delivery/Create 创建发货单。
ApiDeliveryApi put_v1_delivery_confirm_receipt PUT /v1/delivery/ConfirmReceipt 确认收货。
ApiDeliveryApi put_v1_delivery_return_receipt PUT /v1/delivery/ReturnReceipt 收货退回。
ApiDeliveryApi put_v1_delivery_update PUT /v1/delivery/Update 修改发货单。
ApiEnumApi get_v1_enum_get_list GET /v1/enum/GetList 第三方-获取统一枚举列表(支持批量查询/查询所有)
ApiOrderApi delete_v1_order_delete DELETE /v1/order/Delete 第三方-更新订单状态(通过匹配条件获取订单ID)
ApiOrderApi delete_v1_order_delete_line DELETE /v1/order/DeleteLine 第三方-更新订单明细状态(通过匹配条件获取明细ID)
ApiOrderApi get_v1_order_po_list_paging GET /v1/order/POListPaging 第三方-获取采购订单分页列表(含明细)
ApiOrderApi get_v1_order_so_list_paging GET /v1/order/SOListPaging 第三方-获取销售订单分页列表(含明细)
ApiOrderApi post_v1_order_create POST /v1/order/Create 第三方-创建订单(含明细)
ApiOrderApi post_v1_order_so_accept POST /v1/order/SoAccept 第三方-销售订单接单(支持绑定成品/自动创建成品)
ApiOrderApi put_v1_order_update PUT /v1/order/Update 第三方-更新订单(部分字段)
ApiOrderWorkflowApi post_v1_order_submit_audit POST /v1/order/SubmitAudit 销售方根据已入库的订单、生产、发货及申报资料提交审核。
ApiOrderWorkflowApi put_v1_order_confirm_receipt PUT /v1/order/ConfirmReceipt 采购方按整单或单条订单明细确认收货。
ApiProductionApi delete_v1_production_delete DELETE /v1/production/Delete 删除生产记录单。
ApiProductionApi get_v1_production_list_paging GET /v1/production/ListPaging 查询生产记录单及详细领料信息。
ApiProductionApi post_v1_production_create POST /v1/production/Create 创建生产记录单。
ApiProductionApi put_v1_production_update PUT /v1/production/Update 修改生产记录单。

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

BearerToken

  • Type: Bearer authentication

ApiKey

  • Type: API key
  • API key parameter name: X-API-Key
  • Location: HTTP header

Timestamp

  • Type: API key
  • API key parameter name: X-Timestamp
  • Location: HTTP header

Signature

  • Type: API key
  • API key parameter name: X-Signature
  • Location: HTTP header

Author

Metadata

Release files for tachain-sdk 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tachain-sdk 0.1.0
File Size Uploaded Provenance
tachain_sdk-0.1.0.tar.gz 134.4 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for tachain-sdk 0.1.0
File Interpreter ABI Platform
tachain_sdk-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 370.8 kB

Release files / tachain_sdk-0.1.0.tar.gz

Download URL tachain_sdk-0.1.0.tar.gz
Size 134.4 kB
Tags Source
SHA-256 checksum
How to use checksums
22a908314c464e9d95f43ec58916262b4a15ad0987515dd95d3ec93a59ec830e
BLAKE2b-256 checksum
How to use checksums
1642ddd2e9f90f0d8ae86c150dfb1f422434a277bd6b2936ed5975b51788ce5c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release files / tachain_sdk-0.1.0-py3-none-any.whl

Download URL tachain_sdk-0.1.0-py3-none-any.whl
Size 236.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
890d9da7b1b35c0069e864f483c36c9823fbc3ec4272ea6b0d1fad9616eeeb08
BLAKE2b-256 checksum
How to use checksums
78ba43139255fd5191775f6976c55467ed2fa0477ccbe5214eb76d2ce8f10108
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Security for tachain-sdk 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for tachain_sdk-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page