On this page
ssl.create_connection
Prev: ssl.CertificateError | Up: ssl | Next: ssl.create_default_context
Rel: ssl.AlertDescription, ssl.cert_time_to_seconds, ssl.CertificateError, ssl.create_default_context
Ref: docs.python.org — ssl.create_connection
Tags: #public #python3 #stdlib #ssl
Import
import ssl
from ssl import create_connection
Signature & Overview
ssl.create_connection(address, timeout=<object object at 0x1040b4980>, source_address=None, *, all_errors=False)
Connect to address and return the socket object.
Usage
import socket
import ssl
assert ssl.create_connection is socket.create_connection
Gotchas
- Re-export of
socket.create_connection: Prefer callingsocket.create_connection()and wrapping withctx.wrap_socket().
REPL Inspect
from ssl import create_connection
help(create_connection)
Linked from
- tuts/python3/stdlib_module/ssl
- tuts/python3/stdlib_module/ssl/AlertDescription
- tuts/python3/stdlib_module/ssl/cert_time_to_seconds
- tuts/python3/stdlib_module/ssl/CertificateError
- tuts/python3/stdlib_module/ssl/create_default_context
- tuts/python3/stdlib_module/ssl/DefaultVerifyPaths
- tuts/python3/stdlib_module/ssl/DER_cert_to_PEM_cert
- tuts/python3/stdlib_module/ssl/get_default_verify_paths
- tuts/python3/stdlib_module/ssl/get_protocol_name
- tuts/python3/stdlib_module/ssl/get_server_certificate
- tuts/python3/stdlib_module/ssl/MemoryBIO
- tuts/python3/stdlib_module/ssl/namedtuple
- tuts/python3/stdlib_module/ssl/Options
- tuts/python3/stdlib_module/ssl/PEM_cert_to_DER_cert
- tuts/python3/stdlib_module/ssl/Purpose
- tuts/python3/stdlib_module/ssl/RAND_add
- tuts/python3/stdlib_module/ssl/RAND_bytes
- tuts/python3/stdlib_module/ssl/RAND_status
- tuts/python3/stdlib_module/ssl/socket
- tuts/python3/stdlib_module/ssl/socket_error
- tuts/python3/stdlib_module/ssl/SSLCertVerificationError
- tuts/python3/stdlib_module/ssl/SSLContext
- tuts/python3/stdlib_module/ssl/SSLEOFError
- tuts/python3/stdlib_module/ssl/SSLError
- tuts/python3/stdlib_module/ssl/SSLErrorNumber
- tuts/python3/stdlib_module/ssl/SSLObject
- tuts/python3/stdlib_module/ssl/SSLSession
- tuts/python3/stdlib_module/ssl/SSLSocket
- tuts/python3/stdlib_module/ssl/SSLSyscallError
- tuts/python3/stdlib_module/ssl/SSLWantReadError
- tuts/python3/stdlib_module/ssl/SSLWantWriteError
- tuts/python3/stdlib_module/ssl/SSLZeroReturnError
Related notes
- tuts/python3/stdlib_module/ssl/AlertDescription Linked here; links to this page; shared tags: #ssl, #stdlib
- tuts/python3/stdlib_module/ssl/cert_time_to_seconds Linked here; links to this page; shared tags: #ssl, #stdlib
- tuts/python3/stdlib_module/ssl/CertificateError Linked here; links to this page; shared tags: #ssl, #stdlib
- tuts/python3/stdlib_module/ssl/create_default_context Linked here; links to this page; shared tags: #ssl, #stdlib
- tuts/python3/stdlib_module/ssl Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/ssl/DefaultVerifyPaths links to this page; shared tags: #ssl, #stdlib
- tuts/python3/stdlib_module/ssl/DER_cert_to_PEM_cert links to this page; shared tags: #ssl, #stdlib
- tuts/python3/stdlib_module/ssl/get_default_verify_paths links to this page; shared tags: #ssl, #stdlib
- tuts/python3/stdlib_module/ssl/get_protocol_name links to this page; shared tags: #ssl, #stdlib
- tuts/python3/stdlib_module/ssl/get_server_certificate links to this page; shared tags: #ssl, #stdlib