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.dsskey import DSSKey
70from paramiko.ecdsakey import ECDSAKey
71from paramiko.ed25519key import Ed25519Key
72from paramiko.sftp import SFTPError, BaseSFTP
73from paramiko.sftp_client import SFTP, SFTPClient
74from paramiko.sftp_server import SFTPServer
75from paramiko.sftp_attr import SFTPAttributes
76from paramiko.sftp_handle import SFTPHandle
77from paramiko.sftp_si import SFTPServerInterface
78from paramiko.sftp_file import SFTPFile
79from paramiko.message import Message
80from paramiko.packet import Packetizer
81from paramiko.file import BufferedFile
82from paramiko.agent import Agent, AgentKey
83from paramiko.pkey import PKey, PublicBlob, UnknownKeyType
84from paramiko.hostkeys import HostKeys
85from paramiko.config import SSHConfig, SSHConfigDict
86from paramiko.proxy import ProxyCommand
88from paramiko.common import (
89 AUTH_SUCCESSFUL,
90 AUTH_PARTIALLY_SUCCESSFUL,
91 AUTH_FAILED,
92 OPEN_SUCCEEDED,
93 OPEN_FAILED_ADMINISTRATIVELY_PROHIBITED,
94 OPEN_FAILED_CONNECT_FAILED,
95 OPEN_FAILED_UNKNOWN_CHANNEL_TYPE,
96 OPEN_FAILED_RESOURCE_SHORTAGE,
97)
99from paramiko.sftp import (
100 SFTP_OK,
101 SFTP_EOF,
102 SFTP_NO_SUCH_FILE,
103 SFTP_PERMISSION_DENIED,
104 SFTP_FAILURE,
105 SFTP_BAD_MESSAGE,
106 SFTP_NO_CONNECTION,
107 SFTP_CONNECTION_LOST,
108 SFTP_OP_UNSUPPORTED,
109)
111from paramiko.common import io_sleep
114# TODO: I guess a real plugin system might be nice for future expansion...
115key_classes = [DSSKey, RSAKey, Ed25519Key, ECDSAKey]
118__author__ = "Jeff Forcier <jeff@bitprophet.org>"
119__license__ = "GNU Lesser General Public License (LGPL)"
121# TODO 4.0: remove this, jeez
122__all__ = [
123 "Agent",
124 "AgentKey",
125 "AuthenticationException",
126 "AutoAddPolicy",
127 "BadAuthenticationType",
128 "BadHostKeyException",
129 "BufferedFile",
130 "Channel",
131 "ChannelException",
132 "ConfigParseError",
133 "CouldNotCanonicalize",
134 "DSSKey",
135 "ECDSAKey",
136 "Ed25519Key",
137 "HostKeys",
138 "Message",
139 "MissingHostKeyPolicy",
140 "PKey",
141 "PasswordRequiredException",
142 "ProxyCommand",
143 "ProxyCommandFailure",
144 "RSAKey",
145 "RejectPolicy",
146 "SFTP",
147 "SFTPAttributes",
148 "SFTPClient",
149 "SFTPError",
150 "SFTPFile",
151 "SFTPHandle",
152 "SFTPServer",
153 "SFTPServerInterface",
154 "SSHClient",
155 "SSHConfig",
156 "SSHConfigDict",
157 "SSHException",
158 "SecurityOptions",
159 "ServerInterface",
160 "SubsystemHandler",
161 "Transport",
162 "WarningPolicy",
163 "io_sleep",
164 "util",
165]