3DS平台业务层的数据查询SDK
Project description
D3SDK
D3SDK是3DS系统提供的数据开发包(以下简称SDK),用于简化Python里访问各类数据库的操作。
一、安装
1.1 安装SDK
安装SDK最新版本:
pip install -U d3sdk
二、使用SDK
2.1 根据报警编组查询业务对象
from d3sdk.d3_dataframe_db import D3DataFrameDB
k2a_url = f'k2assets+3ds://{k2a_user}:{k2a_basic_token}@{k2a_host}:{k2a_port}'
db = D3DataFrameDB(k2a_url)
result = db.getDeviceFailureRecords(
start_time_1='2024-06-30 12:56:47',
end_time_1='2024-06-30 12:56:50',
start_time_2='2024-06-30 13:42:47',
end_time_2='2024-06-30 13:59:59',
devices=['T0000000002'],
limit=100)
print(type(result[0]))
print(result[0].dfem_code)
运行结果示例:
<class 'd3sdk.device_failure_record.DeviceFailureRecord'>
AG0000101009
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
d3sdk-0.1.4-py3-none-any.whl
(5.4 kB
view details)
File details
Details for the file d3sdk-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: d3sdk-0.1.4-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e73e5e35f45a35fe1d1da8a32c1aa044497f7da2e10ec03b269fef7eba10d079 |
|
MD5 | f773c301c3ecf8cae940c7028ec37cb2 |
|
BLAKE2b-256 | 7b43fd46e2d4cc10d3be9d597470968548eb33d70c716d10e04a1f9127545fd4 |