Skip to main content

QDataV2 adapter for baison-e3

Project description

qdata-adapter-baison-e3

QDataV2 百胜E3适配器

广东轻亿云软件科技有限公司 开发
「轻易云数据集成平台」官方适配器

Python 3.11+ License: MIT PyPI version


📖 简介

qdata-adapter-baison-e3 是 QDataV2 数据集成平台的官方适配器,用于连接 百胜E3(Baison E3)企业管理软件系统。

核心能力

  • 标准 REST API: 统一的 RESTful 接口设计
  • 多种认证: 支持 OAuth2、API Key、Session 等认证方式
  • 完整 CRUD: 支持查询、创建、更新、删除操作
  • 自动翻页: 内置翻页处理,支持游标/offset/page 多种策略
  • 异步迭代: 流式读取,内存友好

适用场景

  • 零售行业 ERP 数据集成
  • 供应链管理数据同步
  • 电商平台订单流转

🚀 快速开始

安装

pip install qdata-adapter-baison-e3

基础用法

import asyncio
from qdata_adapter_baison_e3 import BaisonE3Adapter
from qdata_adapter import ConnectorContext

async def main():
    context = ConnectorContext(
        connector_id="baison-e3-001",
        app_software_code="baison_e3",
        base_url="https://api.baison-e3.com",
        auth_config={
            "client_id": "应用Key",
            "client_secret": "应用Secret",
            "token_url": "https://api.baison-e3.com/oauth/token",
        },
    )

    adapter = BaisonE3Adapter(context)

    # 测试连接
    result = await adapter.test_connection()
    print(f"连接状态: {result.status}")

    # 查询订单列表
    async for order in adapter.list_objects("orders", page_size=100):
        print(order)

asyncio.run(main())

⚙️ 配置说明

auth_config 格式

# OAuth2 认证(推荐)
{
    "client_id": "应用Key",
    "client_secret": "应用Secret",
    "token_url": "https://api.baison-e3.com/oauth/token",
}

# API Key 认证
{
    "api_key": "API密钥",
    "api_secret": "API密钥私钥",
}

# Session 认证
{
    "username": "用户名",
    "password": "密码",
    "company_code": "企业代码",
}

settings 配置

{
    "interface": "standard",  # 接口类型,默认 "standard"
    "locale": "zh_CN",        # 本地化,默认 "zh_CN"
}

📚 API 文档

BaisonE3Adapter

适配器主类,继承自 BaseAppAdapter

方法

方法 说明
authenticate() 获取认证 Token
refresh_token() 刷新 Token
list_objects(type, filters, page_size) 列表查询(自动翻页)
get_object(type, id) 单条查询
create_object(type, data) 创建对象
update_object(type, id, data) 更新对象
delete_object(type, id) 删除对象
test_connection() 连接测试
health_check() 健康检查

🧪 测试

# 安装开发依赖
make install-dev

# 运行测试(Mock 模式)
make test

# 运行测试(带覆盖率)
make test-cov

# 代码检查
make check

📄 许可与商业政策

本项目采用 MIT 开源协议。


🏢 关于轻易云数据集成平台

广东轻亿云软件科技有限公司 专注数据集成与处理,提供企业级 ETL/ELT 解决方案 🌐 官网:https://www.qeasy.cloud 📧 开源项目:opensource@qeasy.cloud 📧 商业咨询:vincent@qeasy.cloud


Powered by 广东轻亿云软件科技有限公司

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qdata_adapter_baison_e3-0.1.0.tar.gz (36.3 kB view details)

Uploaded Source

Built Distribution

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

qdata_adapter_baison_e3-0.1.0-py3-none-any.whl (16.8 kB view details)

Uploaded Python 3

File details

Details for the file qdata_adapter_baison_e3-0.1.0.tar.gz.

File metadata

  • Download URL: qdata_adapter_baison_e3-0.1.0.tar.gz
  • Upload date:
  • Size: 36.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for qdata_adapter_baison_e3-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8e436689f90cd5a13afd829809a2f9647d5dbff7fb13bcd7d506c0ad32dff60f
MD5 701f7f00f4daafea8e8604c822dd4d7e
BLAKE2b-256 4684b007981a79ed39ca9ced914a68dbd17d2589a1fc54c1fc48fc4918256e8f

See more details on using hashes here.

Provenance

The following attestation bundles were made for qdata_adapter_baison_e3-0.1.0.tar.gz:

Publisher: publish.yml on vincent067/qdata-adapter-baison-e3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qdata_adapter_baison_e3-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for qdata_adapter_baison_e3-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4b92e7e4b3d78723dfca7abd9ff6fff6171917ddaac6a0bc6dcfc3bbcf7fefef
MD5 f7cbca8078e213dc816860dc6aeb6fad
BLAKE2b-256 4a95905479ecffd315efb8cb98159b7a6a46f657e459773d5ff4fcd8e746e6d8

See more details on using hashes here.

Provenance

The following attestation bundles were made for qdata_adapter_baison_e3-0.1.0-py3-none-any.whl:

Publisher: publish.yml on vincent067/qdata-adapter-baison-e3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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