Skip to main content

机器人控制系统的通用工具包

Project description

本模块是机器人控制系统的通用工具包,原始模型是幻尔机器人的硬件和软件,但是软件部分扩展功能不够好,因此本人需要对其进行重构

以上功能使用首先实例化类,然后调用各个函数,也可以根据 需求查看源码进行二次开发使用:

from pyzabbixAll import zabbix_api

if __name__=="__main__":
    # 测试zabbix操作
    url = 'http://###/zabbix'
    username = "###"
    password = "###"

    huabei_zabbix_api = zabbix_api(url, username, password)
    # aaa = huabei_zabbix_api.get_host_list(48, "none")
    # bbb = huabei_zabbix_api.get_name_ip_all(48, "none")
    # print(aaa)
    # print(bbb)

    # ccc = huabei_zabbix_api.get_groupID("机房-B28")
    # ddd = huabei_zabbix_api.get_templateID("NOC-HB-Network")
    # dd = huabei_zabbix_api.get_hostID("2B-B28-F1-H3C-5800-CNC-2698")
    # eee = huabei_zabbix_api.get_host_group_name("NOC-HB-Network-Group")
    # fff = huabei_zabbix_api.get_host_template_name("NOC-HB-Network")
    # ggg = huabei_zabbix_api.get_host_template_name("NOC-HB-Network-Huawei_CloudEngine_8800")
    # hhh = huabei_zabbix_api.get_graph_group_name("机房-B28")
    # iii = huabei_zabbix_api.get_item_group_name("机房-B28")
    # jjj = huabei_zabbix_api.get_trigger_group_name("机房-B28")
    # kkk = huabei_zabbix_api.get_graph_host_name("2B-B28-F1-H3C-5800-CNC-2698")
    # ll = huabei_zabbix_api.get_item_host_name("2B-B28-F1-H3C-5800-CNC-2698")
    # mm = huabei_zabbix_api.get_item_graph_name("2B-B28-F1-H3C-5800-CNC-2698", "Interface Ten-GigabitEthernet1/1/4: Network traffic")
    # nn = huabei_zabbix_api.get_trigger_host_name("2B-B28-F1-H3C-5800-CNC-2698")
    # oo = huabei_zabbix_api.get_trigger_item_name("2B-B28-F1-H3C-5800-CNC-2698", "ICMP response time")
    # pp = huabei_zabbix_api.get_history_item_name("2B-B28-F1-H3C-5800-CNC-2698", "Interface Ten-GigabitEthernet1/1/4: Bits received", "2020-09-09 08:00:00", "2020-09-09 09:00:00")
    # qq = huabei_zabbix_api.get_history_itemID(89557, "2020-08-01 00:00:00", "2020-08-31 23:59:00")
    rr = huabei_zabbix_api.get_map("网络拓扑图demo1")
    # print(ccc, ddd, dd)
    # print(len(eee), eee)
    # print(len(fff), fff)
    # print(len(ggg), ggg)
    # print(len(hhh), hhh)
    # print(len(iii), iii)
    # print(len(jjj), jjj)
    # print(len(kkk), kkk)
    # print(len(ll), ll)
    # print(len(mm), mm)
    # print(len(nn), nn)
    # print(len(oo), oo)
    # print(len(pp), pp)
    # for i in pp:
    #     value = i['value']
    #     last_time = timestamp_to_time(i['clock'])
    #     print(value, last_time)
    # print(len(qq), qq)
    # for i in qq:
    #     value = i['value']
    #     last_time = timestamp_to_time(i['clock'])
    #     print(value, last_time)
    print(len(rr), rr)

以上是部分测试代码,大家可以放心使用

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

RobotLib-1.0.0.tar.gz (15.7 kB view details)

Uploaded Source

File details

Details for the file RobotLib-1.0.0.tar.gz.

File metadata

  • Download URL: RobotLib-1.0.0.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5

File hashes

Hashes for RobotLib-1.0.0.tar.gz
Algorithm Hash digest
SHA256 39ac9066f6ab72ea7a1ba43a438134730782cdc1a1744e95a912403e7bb2e2b0
MD5 488378e1c4361320503b9c427f8f1220
BLAKE2b-256 582cd71780a311424d425640eec383ff9d7178a9f5f73da18ee1ee8e23b4dde2

See more details on using hashes here.

Supported by

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