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

Module scrapli.transport.base.sync_transport

scrapli.transport.base_transport

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

from scrapli.transport.base.base_transport import BaseTransport


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

        Args:
            N/A

        Returns:
            None

        Raises:
            N/A

        """

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

        Args:
            N/A

        Returns:
            None

        Raises:
            N/A

        """
        
    

Classes

Transport

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

        Args:
            N/A

        Returns:
            None

        Raises:
            N/A

        """

    @abstractmethod
    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.paramiko.transport.ParamikoTransport
  • scrapli.transport.plugins.ssh2.transport.Ssh2Transport
  • scrapli.transport.plugins.system.transport.SystemTransport
  • scrapli.transport.plugins.telnet.transport.TelnetTransport

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