Skip to main content

Python ANCP (RFC 6320) Client and Library

Project description

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) client and library. PyANCP requires Python 2.7 or later, or Python 3.2 or later.

State: BETA

ANCP Library Example

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()

Author: Christian Giese and Wolfgang Beck

Contributors: - Istvan Ruzman

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

pyancp-0.1.7.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

PyANCP-0.1.7-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file pyancp-0.1.7.tar.gz.

File metadata

  • Download URL: pyancp-0.1.7.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for pyancp-0.1.7.tar.gz
Algorithm Hash digest
SHA256 66da5133916f218efb35922e349006e6b5a09e08fa9656f02e1b5101e3eaae13
MD5 cf7db6ccaa7beae0f8056484204465ff
BLAKE2b-256 15157db8cc3ec996cc229d7733b42eb943a6c9d776c65f653967428763dbfc5f

See more details on using hashes here.

File details

Details for the file PyANCP-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: PyANCP-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for PyANCP-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 09146d663ae1c2d3fbf32ba9a10379b0e7addc0d204eca1c9b81c38708c8dcd2
MD5 343e331d00617c50c915671a4ef37c1c
BLAKE2b-256 71250e43c3330261dc0175b0ef778392d5c789e8b3a340f97f9ea5e92b5e14e2

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