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.1.tar.gz (15.7 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: RobotLib-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 7854b3f075e60ef0ff71d2cd17981dfb54e335f127395b392a9d3dd666095657
MD5 02e5029246815536eef52b2e6ff6626a
BLAKE2b-256 3519d4258eb2782bbe5a9c00a09c8a837345ff9581e81579e99370f6293f0df5

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