一个基于MCP协议的运输工具服务,提供批量外部派车功能
Project description
vantransTool
一个基于MCP协议的运输工具服务,提供批量外部派车功能。
功能特点
- 支持批量外部派车
- 支持多组订单号、供应商和指派类型
- 基于MCP协议的高效通信
- 完整的错误处理和日志记录
安装
pip install vantransTool
使用方法
- 启动服务器:
python -m vantransTool.server
- 使用客户端:
import asyncio
from vantransTool.client import dispatch_orders
async def main():
dispatch_groups = [
{
"order_numbers": ["5000987906", "5000987907"],
"supplier_name": "上海乐增",
"dispatch_type": "提货"
}
]
result = await dispatch_orders(dispatch_groups)
print(result)
if __name__ == "__main__":
asyncio.run(main())
配置
在 config.py 中配置以下参数:
BASE_URL: API基础URLAPI_TOKEN: API令牌SPACE_ID: 空间IDSUPPLIER_DISPATCH_TABLE: 供应商派车表IDGOODS_DETAIL_TABLE: 货物明细表IDSUPPLIER_TABLE: 供应商表IDSUPPLIER_VIEW: 供应商视图ID
开发
- 克隆仓库:
git clone https://github.com/yourusername/vantransTool.git
cd vantransTool
- 安装开发依赖:
pip install -e ".[dev]"
- 运行测试:
python -m pytest
许可证
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
vantranstool-0.1.1.tar.gz
(7.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vantranstool-0.1.1.tar.gz.
File metadata
- Download URL: vantranstool-0.1.1.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cdf2434118ad4fcd08e2f1c9a4143fbc2993c84975b9a7adeec8309b981bc9da
|
|
| MD5 |
7a1d499d4c9c5f81a8750caa6546f80a
|
|
| BLAKE2b-256 |
74b491a716da59ec2c7f9af28c93fedb27ce345dc3cce62d95075645888c2498
|
File details
Details for the file vantranstool-0.1.1-py3-none-any.whl.
File metadata
- Download URL: vantranstool-0.1.1-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1f16d6812f16343f67bc7e8c5c7bf603e8552e1ac39a2064bb087467e58cfc9
|
|
| MD5 |
2d975aa5ef7c55f66fb4d2dd4b196c33
|
|
| BLAKE2b-256 |
e40c805e2f82fadefaf9de89c7b7438cdc18b592907fad1c912c257227d37d3a
|