Archived documentation version rendered and hosted by DevNetExpertTraining.com
Skip to content

Module scrapli.transport.base.async_transport

scrapli.transport.async_transport

Expand source code
        
"""scrapli.transport.async_transport"""
from abc import ABC, abstractmethod

from scrapli.transport.base.base_transport import BaseTransport


class AsyncTransport(BaseTransport, ABC):
    @abstractmethod
    async def open(self) -> None:
        """
        Open the transport session

        Args:
            N/A

        Returns:
            None

        Raises:
            N/A

        """

    @abstractmethod
    async def read(self) -> bytes:
        """
        Read data from the transport session

        Args:
            N/A

        Returns:
            None

        Raises:
            N/A

        """
        
    

Classes

AsyncTransport

1
2
Helper class that provides a standard way to create an ABC using
inheritance.
Expand source code
        
class AsyncTransport(BaseTransport, ABC):
    @abstractmethod
    async def open(self) -> None:
        """
        Open the transport session

        Args:
            N/A

        Returns:
            None

        Raises:
            N/A

        """

    @abstractmethod
    async def read(self) -> bytes:
        """
        Read data from the transport session

        Args:
            N/A

        Returns:
            None

        Raises:
            N/A

        """
        
    

Ancestors (in MRO)

  • scrapli.transport.base.base_transport.BaseTransport
  • abc.ABC

Descendants

  • scrapli.transport.plugins.asyncssh.transport.AsyncsshTransport
  • scrapli.transport.plugins.asynctelnet.transport.AsynctelnetTransport

Methods

open

open(self) ‑> NoneType

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
Open the transport session

Args:
    N/A

Returns:
    None

Raises:
    N/A
read

read(self) ‑> bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
Read data from the transport session

Args:
    N/A

Returns:
    None

Raises:
    N/A