Python ANCP (RFC 6320) 客户端和库
项目描述
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 查看哈希)
关闭
pyancp-0.1.7.tar.gz的哈希
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 66da5133916f218efb35922e349006e6b5a09e08fa9656f02e1b5101e3eaae13 |
|
MD5 | cf7db6ccaa7beae0f8056484204465ff |
|
BLAKE2b-256 | 15157db8cc3ec996cc229d7733b42eb943a6c9d776c65f653967428763dbfc5f |