跳转到主要内容

Python ANCP (RFC 6320) 客户端和库

项目描述

https://github.com/GIC-de/PyANCP/actions/workflows/python-test.yml/badge.svg https://coveralls.io/repos/github/GIC-de/PyANCP/badge.svg?branch=master Documentation Status

PyANCP

Python ANCP (RFC 6320) 客户端和库。PyANCP需要Python 2.7或更高版本,或Python 3.2或更高版本。

状态:BETA

ANCP 库示例

from ancp.client import Client
from ancp.subscriber import Subscriber

# setup ancp session
client = Client(address="1.2.3.4")
if client.connect():
    # create ancp subscribers
    S1 = Subscriber(aci="0.0.0.0 eth 1", up=1024, down=16000)
    S2 = Subscriber(aci="0.0.0.0 eth 2", up=2048, down=32000)
    # send port-up for ancp subscribers
    client.port_up([S1, S2])
    # keep session active
    try:
        while client.established.is_set():
            time.sleep(1)
    except KeyboardInterrupt:
        # send port-down for ancp subscribers
        client.port_down([S1, S2])
        client.disconnect()

作者:Christian Giese 和 Wolfgang Beck

贡献者:- Istvan Ruzman

项目详情


下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。

源分布

pyancp-0.1.7.tar.gz (9.4 kB 查看哈希)

上传时间:

构建分布

PyANCP-0.1.7-py3-none-any.whl (9.0 kB 查看哈希)

上传时间: Python 3

支持者

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面