Coverage for /pythoncovmergedfiles/medio/medio/src/paramiko/paramiko/__init__.py: 97%
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1# Copyright (C) 2003-2011 Robey Pointer <robeypointer@gmail.com>
2#
3# This file is part of paramiko.
4#
5# Paramiko is free software; you can redistribute it and/or modify it under the
6# terms of the GNU Lesser General Public License as published by the Free
7# Software Foundation; either version 2.1 of the License, or (at your option)
8# any later version.
9#
10# Paramiko is distributed in the hope that it will be useful, but WITHOUT ANY
11# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12# A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13# details.
14#
15# You should have received a copy of the GNU Lesser General Public License
16# along with Paramiko; if not, write to the Free Software Foundation, Inc.,
17# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19# flake8: noqa
20import sys
21from paramiko._version import __version__, __version_info__
22from paramiko.transport import (
23 SecurityOptions,
24 ServiceRequestingTransport,
25 Transport,
26)
27from paramiko.client import (
28 AutoAddPolicy,
29 MissingHostKeyPolicy,
30 RejectPolicy,
31 SSHClient,
32 WarningPolicy,
33)
34from paramiko.auth_handler import AuthHandler
35from paramiko.auth_strategy import (
36 AuthFailure,
37 AuthStrategy,
38 AuthResult,
39 AuthSource,
40 InMemoryPrivateKey,
41 NoneAuth,
42 OnDiskPrivateKey,
43 Password,
44 PrivateKey,
45 SourceResult,
46)
47from paramiko.ssh_gss import GSSAuth, GSS_AUTH_AVAILABLE, GSS_EXCEPTIONS
48from paramiko.channel import (
49 Channel,
50 ChannelFile,
51 ChannelStderrFile,
52 ChannelStdinFile,
53)
54from paramiko.ssh_exception import (
55 AuthenticationException,
56 BadAuthenticationType,
57 BadHostKeyException,
58 ChannelException,
59 ConfigParseError,
60 CouldNotCanonicalize,
61 IncompatiblePeer,
62 MessageOrderError,
63 PasswordRequiredException,
64 ProxyCommandFailure,
65 SSHException,
66)
67from paramiko.server import ServerInterface, SubsystemHandler, InteractiveQuery
68from paramiko.rsakey import RSAKey
69from paramiko.ecdsakey import ECDSAKey
70from paramiko.ed25519key import Ed25519Key
71from paramiko.sftp import SFTPError, BaseSFTP
72from paramiko.sftp_client import SFTP, SFTPClient
73from paramiko.sftp_server import SFTPServer
74from paramiko.sftp_attr import SFTPAttributes
75from paramiko.sftp_handle import SFTPHandle
76from paramiko.sftp_si import SFTPServerInterface
77from paramiko.sftp_file import SFTPFile
78from paramiko.message import Message
79from paramiko.packet import Packetizer
80from paramiko.file import BufferedFile
81from paramiko.agent import Agent, AgentKey
82from paramiko.pkey import PKey, PublicBlob, UnknownKeyType
83from paramiko.hostkeys import HostKeys
84from paramiko.config import SSHConfig, SSHConfigDict
85from paramiko.proxy import ProxyCommand
87from paramiko.common import (
88 AUTH_SUCCESSFUL,
89 AUTH_PARTIALLY_SUCCESSFUL,
90 AUTH_FAILED,
91 OPEN_SUCCEEDED,
92 OPEN_FAILED_ADMINISTRATIVELY_PROHIBITED,
93 OPEN_FAILED_CONNECT_FAILED,
94 OPEN_FAILED_UNKNOWN_CHANNEL_TYPE,
95 OPEN_FAILED_RESOURCE_SHORTAGE,
96)
98from paramiko.sftp import (
99 SFTP_OK,
100 SFTP_EOF,
101 SFTP_NO_SUCH_FILE,
102 SFTP_PERMISSION_DENIED,
103 SFTP_FAILURE,
104 SFTP_BAD_MESSAGE,
105 SFTP_NO_CONNECTION,
106 SFTP_CONNECTION_LOST,
107 SFTP_OP_UNSUPPORTED,
108)
110from paramiko.common import io_sleep
113# TODO: I guess a real plugin system might be nice for future expansion...
114key_classes = [RSAKey, Ed25519Key, ECDSAKey]
117__author__ = "Jeff Forcier <jeff@bitprophet.org>"
118__license__ = "GNU Lesser General Public License (LGPL)"
120# TODO 4.0: remove this, jeez
121__all__ = [
122 "Agent",
123 "AgentKey",
124 "AuthenticationException",
125 "AutoAddPolicy",
126 "BadAuthenticationType",
127 "BadHostKeyException",
128 "BufferedFile",
129 "Channel",
130 "ChannelException",
131 "ConfigParseError",
132 "CouldNotCanonicalize",
133 "ECDSAKey",
134 "Ed25519Key",
135 "HostKeys",
136 "Message",
137 "MissingHostKeyPolicy",
138 "PKey",
139 "PasswordRequiredException",
140 "ProxyCommand",
141 "ProxyCommandFailure",
142 "RSAKey",
143 "RejectPolicy",
144 "SFTP",
145 "SFTPAttributes",
146 "SFTPClient",
147 "SFTPError",
148 "SFTPFile",
149 "SFTPHandle",
150 "SFTPServer",
151 "SFTPServerInterface",
152 "SSHClient",
153 "SSHConfig",
154 "SSHConfigDict",
155 "SSHException",
156 "SecurityOptions",
157 "ServerInterface",
158 "SubsystemHandler",
159 "Transport",
160 "WarningPolicy",
161 "io_sleep",
162 "util",
163]