doc_content stringlengths 1 386k | doc_id stringlengths 5 188 |
|---|---|
serve_forever(poll_interval=0.5)
Handle requests until an explicit shutdown() request. Poll for shutdown every poll_interval seconds. Ignores the timeout attribute. It also calls service_actions(), which may be used by a subclass or mixin to provide actions specific to a given service. For example, the ForkingMixIn c... | python.library.socketserver#socketserver.BaseServer.serve_forever |
service_actions()
This is called in the serve_forever() loop. This method can be overridden by subclasses or mixin classes to perform actions specific to a given service, such as cleanup actions. New in version 3.3. | python.library.socketserver#socketserver.BaseServer.service_actions |
shutdown()
Tell the serve_forever() loop to stop and wait until it does. shutdown() must be called while serve_forever() is running in a different thread otherwise it will deadlock. | python.library.socketserver#socketserver.BaseServer.shutdown |
socket
The socket object on which the server will listen for incoming requests. | python.library.socketserver#socketserver.BaseServer.socket |
socket_type
The type of socket used by the server; socket.SOCK_STREAM and socket.SOCK_DGRAM are two common values. | python.library.socketserver#socketserver.BaseServer.socket_type |
timeout
Timeout duration, measured in seconds, or None if no timeout is desired. If handle_request() receives no incoming requests within the timeout period, the handle_timeout() method is called. | python.library.socketserver#socketserver.BaseServer.timeout |
verify_request(request, client_address)
Must return a Boolean value; if the value is True, the request will be processed, and if it’s False, the request will be denied. This function can be overridden to implement access controls for a server. The default implementation always returns True. | python.library.socketserver#socketserver.BaseServer.verify_request |
class socketserver.StreamRequestHandler
class socketserver.DatagramRequestHandler
These BaseRequestHandler subclasses override the setup() and finish() methods, and provide self.rfile and self.wfile attributes. The self.rfile and self.wfile attributes can be read or written, respectively, to get the request data or... | python.library.socketserver#socketserver.DatagramRequestHandler |
class socketserver.ForkingMixIn
class socketserver.ThreadingMixIn
Forking and threading versions of each type of server can be created using these mix-in classes. For instance, ThreadingUDPServer is created as follows: class ThreadingUDPServer(ThreadingMixIn, UDPServer):
pass
The mix-in class comes first, sinc... | python.library.socketserver#socketserver.ForkingMixIn |
class socketserver.ForkingTCPServer
class socketserver.ForkingUDPServer
class socketserver.ThreadingTCPServer
class socketserver.ThreadingUDPServer
These classes are pre-defined using the mix-in classes. | python.library.socketserver#socketserver.ForkingTCPServer |
class socketserver.ForkingTCPServer
class socketserver.ForkingUDPServer
class socketserver.ThreadingTCPServer
class socketserver.ThreadingUDPServer
These classes are pre-defined using the mix-in classes. | python.library.socketserver#socketserver.ForkingUDPServer |
class socketserver.StreamRequestHandler
class socketserver.DatagramRequestHandler
These BaseRequestHandler subclasses override the setup() and finish() methods, and provide self.rfile and self.wfile attributes. The self.rfile and self.wfile attributes can be read or written, respectively, to get the request data or... | python.library.socketserver#socketserver.StreamRequestHandler |
class socketserver.TCPServer(server_address, RequestHandlerClass, bind_and_activate=True)
This uses the Internet TCP protocol, which provides for continuous streams of data between the client and server. If bind_and_activate is true, the constructor automatically attempts to invoke server_bind() and server_activate()... | python.library.socketserver#socketserver.TCPServer |
class socketserver.ForkingMixIn
class socketserver.ThreadingMixIn
Forking and threading versions of each type of server can be created using these mix-in classes. For instance, ThreadingUDPServer is created as follows: class ThreadingUDPServer(ThreadingMixIn, UDPServer):
pass
The mix-in class comes first, sinc... | python.library.socketserver#socketserver.ThreadingMixIn |
class socketserver.ForkingTCPServer
class socketserver.ForkingUDPServer
class socketserver.ThreadingTCPServer
class socketserver.ThreadingUDPServer
These classes are pre-defined using the mix-in classes. | python.library.socketserver#socketserver.ThreadingTCPServer |
class socketserver.ForkingTCPServer
class socketserver.ForkingUDPServer
class socketserver.ThreadingTCPServer
class socketserver.ThreadingUDPServer
These classes are pre-defined using the mix-in classes. | python.library.socketserver#socketserver.ThreadingUDPServer |
class socketserver.UDPServer(server_address, RequestHandlerClass, bind_and_activate=True)
This uses datagrams, which are discrete packets of information that may arrive out of order or be lost while in transit. The parameters are the same as for TCPServer. | python.library.socketserver#socketserver.UDPServer |
class socketserver.UnixStreamServer(server_address, RequestHandlerClass, bind_and_activate=True)
class socketserver.UnixDatagramServer(server_address, RequestHandlerClass, bind_and_activate=True)
These more infrequently used classes are similar to the TCP and UDP classes, but use Unix domain sockets; they’re not av... | python.library.socketserver#socketserver.UnixDatagramServer |
class socketserver.UnixStreamServer(server_address, RequestHandlerClass, bind_and_activate=True)
class socketserver.UnixDatagramServer(server_address, RequestHandlerClass, bind_and_activate=True)
These more infrequently used classes are similar to the TCP and UDP classes, but use Unix domain sockets; they’re not av... | python.library.socketserver#socketserver.UnixStreamServer |
sorted(iterable, *, key=None, reverse=False)
Return a new sorted list from the items in iterable. Has two optional arguments which must be specified as keyword arguments. key specifies a function of one argument that is used to extract a comparison key from each element in iterable (for example, key=str.lower). The d... | python.library.functions#sorted |
spwd — The shadow password database This module provides access to the Unix shadow password database. It is available on various Unix versions. You must have enough privileges to access the shadow password database (this usually means you have to be root). Shadow password database entries are reported as a tuple-like o... | python.library.spwd |
spwd.getspall()
Return a list of all available shadow password database entries, in arbitrary order. | python.library.spwd#spwd.getspall |
spwd.getspnam(name)
Return the shadow password database entry for the given user name. Changed in version 3.6: Raises a PermissionError instead of KeyError if the user doesn’t have privileges. | python.library.spwd#spwd.getspnam |
sqlite3 — DB-API 2.0 interface for SQLite databases Source code: Lib/sqlite3/ SQLite is a C library that provides a lightweight disk-based database that doesn’t require a separate server process and allows accessing the database using a nonstandard variant of the SQL query language. Some applications can use SQLite for... | python.library.sqlite3 |
sqlite3.complete_statement(sql)
Returns True if the string sql contains one or more complete SQL statements terminated by semicolons. It does not verify that the SQL is syntactically correct, only that there are no unclosed string literals and the statement is terminated by a semicolon. This can be used to build a sh... | python.library.sqlite3#sqlite3.complete_statement |
sqlite3.connect(database[, timeout, detect_types, isolation_level, check_same_thread, factory, cached_statements, uri])
Opens a connection to the SQLite database file database. By default returns a Connection object, unless a custom factory is given. database is a path-like object giving the pathname (absolute or rel... | python.library.sqlite3#sqlite3.connect |
class sqlite3.Connection
A SQLite database connection has the following attributes and methods:
isolation_level
Get or set the current default isolation level. None for autocommit mode or one of “DEFERRED”, “IMMEDIATE” or “EXCLUSIVE”. See section Controlling Transactions for a more detailed explanation.
in_tr... | python.library.sqlite3#sqlite3.Connection |
backup(target, *, pages=-1, progress=None, name="main", sleep=0.250)
This method makes a backup of a SQLite database even while it’s being accessed by other clients, or concurrently by the same connection. The copy will be written into the mandatory argument target, that must be another Connection instance. By defaul... | python.library.sqlite3#sqlite3.Connection.backup |
close()
This closes the database connection. Note that this does not automatically call commit(). If you just close your database connection without calling commit() first, your changes will be lost! | python.library.sqlite3#sqlite3.Connection.close |
commit()
This method commits the current transaction. If you don’t call this method, anything you did since the last call to commit() is not visible from other database connections. If you wonder why you don’t see the data you’ve written to the database, please check you didn’t forget to call this method. | python.library.sqlite3#sqlite3.Connection.commit |
create_aggregate(name, num_params, aggregate_class)
Creates a user-defined aggregate function. The aggregate class must implement a step method, which accepts the number of parameters num_params (if num_params is -1, the function may take any number of arguments), and a finalize method which will return the final res... | python.library.sqlite3#sqlite3.Connection.create_aggregate |
create_collation(name, callable)
Creates a collation with the specified name and callable. The callable will be passed two string arguments. It should return -1 if the first is ordered lower than the second, 0 if they are ordered equal and 1 if the first is ordered higher than the second. Note that this controls sort... | python.library.sqlite3#sqlite3.Connection.create_collation |
create_function(name, num_params, func, *, deterministic=False)
Creates a user-defined function that you can later use from within SQL statements under the function name name. num_params is the number of parameters the function accepts (if num_params is -1, the function may take any number of arguments), and func is ... | python.library.sqlite3#sqlite3.Connection.create_function |
cursor(factory=Cursor)
The cursor method accepts a single optional parameter factory. If supplied, this must be a callable returning an instance of Cursor or its subclasses. | python.library.sqlite3#sqlite3.Connection.cursor |
enable_load_extension(enabled)
This routine allows/disallows the SQLite engine to load SQLite extensions from shared libraries. SQLite extensions can define new functions, aggregates or whole new virtual table implementations. One well-known extension is the fulltext-search extension distributed with SQLite. Loadable... | python.library.sqlite3#sqlite3.Connection.enable_load_extension |
execute(sql[, parameters])
This is a nonstandard shortcut that creates a cursor object by calling the cursor() method, calls the cursor’s execute() method with the parameters given, and returns the cursor. | python.library.sqlite3#sqlite3.Connection.execute |
executemany(sql[, parameters])
This is a nonstandard shortcut that creates a cursor object by calling the cursor() method, calls the cursor’s executemany() method with the parameters given, and returns the cursor. | python.library.sqlite3#sqlite3.Connection.executemany |
executescript(sql_script)
This is a nonstandard shortcut that creates a cursor object by calling the cursor() method, calls the cursor’s executescript() method with the given sql_script, and returns the cursor. | python.library.sqlite3#sqlite3.Connection.executescript |
interrupt()
You can call this method from a different thread to abort any queries that might be executing on the connection. The query will then abort and the caller will get an exception. | python.library.sqlite3#sqlite3.Connection.interrupt |
in_transaction
True if a transaction is active (there are uncommitted changes), False otherwise. Read-only attribute. New in version 3.2. | python.library.sqlite3#sqlite3.Connection.in_transaction |
isolation_level
Get or set the current default isolation level. None for autocommit mode or one of “DEFERRED”, “IMMEDIATE” or “EXCLUSIVE”. See section Controlling Transactions for a more detailed explanation. | python.library.sqlite3#sqlite3.Connection.isolation_level |
iterdump()
Returns an iterator to dump the database in an SQL text format. Useful when saving an in-memory database for later restoration. This function provides the same capabilities as the .dump command in the sqlite3 shell. Example: # Convert file existing_db.db to SQL dump file dump.sql
import sqlite3
con = sqli... | python.library.sqlite3#sqlite3.Connection.iterdump |
load_extension(path)
This routine loads a SQLite extension from a shared library. You have to enable extension loading with enable_load_extension() before you can use this routine. Loadable extensions are disabled by default. See 1. New in version 3.2. | python.library.sqlite3#sqlite3.Connection.load_extension |
rollback()
This method rolls back any changes to the database since the last call to commit(). | python.library.sqlite3#sqlite3.Connection.rollback |
row_factory
You can change this attribute to a callable that accepts the cursor and the original row as a tuple and will return the real result row. This way, you can implement more advanced ways of returning results, such as returning an object that can also access columns by name. Example: import sqlite3
def dict_... | python.library.sqlite3#sqlite3.Connection.row_factory |
set_authorizer(authorizer_callback)
This routine registers a callback. The callback is invoked for each attempt to access a column of a table in the database. The callback should return SQLITE_OK if access is allowed, SQLITE_DENY if the entire SQL statement should be aborted with an error and SQLITE_IGNORE if the col... | python.library.sqlite3#sqlite3.Connection.set_authorizer |
set_progress_handler(handler, n)
This routine registers a callback. The callback is invoked for every n instructions of the SQLite virtual machine. This is useful if you want to get called from SQLite during long-running operations, for example to update a GUI. If you want to clear any previously installed progress h... | python.library.sqlite3#sqlite3.Connection.set_progress_handler |
set_trace_callback(trace_callback)
Registers trace_callback to be called for each SQL statement that is actually executed by the SQLite backend. The only argument passed to the callback is the statement (as string) that is being executed. The return value of the callback is ignored. Note that the backend does not onl... | python.library.sqlite3#sqlite3.Connection.set_trace_callback |
text_factory
Using this attribute you can control what objects are returned for the TEXT data type. By default, this attribute is set to str and the sqlite3 module will return Unicode objects for TEXT. If you want to return bytestrings instead, you can set it to bytes. You can also set it to any other callable that a... | python.library.sqlite3#sqlite3.Connection.text_factory |
total_changes
Returns the total number of database rows that have been modified, inserted, or deleted since the database connection was opened. | python.library.sqlite3#sqlite3.Connection.total_changes |
class sqlite3.Cursor
A Cursor instance has the following attributes and methods.
execute(sql[, parameters])
Executes an SQL statement. Values may be bound to the statement using placeholders. execute() will only execute a single SQL statement. If you try to execute more than one statement with it, it will raise a... | python.library.sqlite3#sqlite3.Cursor |
arraysize
Read/write attribute that controls the number of rows returned by fetchmany(). The default value is 1 which means a single row would be fetched per call. | python.library.sqlite3#sqlite3.Cursor.arraysize |
close()
Close the cursor now (rather than whenever __del__ is called). The cursor will be unusable from this point forward; a ProgrammingError exception will be raised if any operation is attempted with the cursor. | python.library.sqlite3#sqlite3.Cursor.close |
connection
This read-only attribute provides the SQLite database Connection used by the Cursor object. A Cursor object created by calling con.cursor() will have a connection attribute that refers to con: >>> con = sqlite3.connect(":memory:")
>>> cur = con.cursor()
>>> cur.connection == con
True | python.library.sqlite3#sqlite3.Cursor.connection |
description
This read-only attribute provides the column names of the last query. To remain compatible with the Python DB API, it returns a 7-tuple for each column where the last six items of each tuple are None. It is set for SELECT statements without any matching rows as well. | python.library.sqlite3#sqlite3.Cursor.description |
execute(sql[, parameters])
Executes an SQL statement. Values may be bound to the statement using placeholders. execute() will only execute a single SQL statement. If you try to execute more than one statement with it, it will raise a Warning. Use executescript() if you want to execute multiple SQL statements with one... | python.library.sqlite3#sqlite3.Cursor.execute |
executemany(sql, seq_of_parameters)
Executes a parameterized SQL command against all parameter sequences or mappings found in the sequence seq_of_parameters. The sqlite3 module also allows using an iterator yielding parameters instead of a sequence. import sqlite3
class IterChars:
def __init__(self):
sel... | python.library.sqlite3#sqlite3.Cursor.executemany |
executescript(sql_script)
This is a nonstandard convenience method for executing multiple SQL statements at once. It issues a COMMIT statement first, then executes the SQL script it gets as a parameter. sql_script can be an instance of str. Example: import sqlite3
con = sqlite3.connect(":memory:")
cur = con.cursor()... | python.library.sqlite3#sqlite3.Cursor.executescript |
fetchall()
Fetches all (remaining) rows of a query result, returning a list. Note that the cursor’s arraysize attribute can affect the performance of this operation. An empty list is returned when no rows are available. | python.library.sqlite3#sqlite3.Cursor.fetchall |
fetchmany(size=cursor.arraysize)
Fetches the next set of rows of a query result, returning a list. An empty list is returned when no more rows are available. The number of rows to fetch per call is specified by the size parameter. If it is not given, the cursor’s arraysize determines the number of rows to be fetched.... | python.library.sqlite3#sqlite3.Cursor.fetchmany |
fetchone()
Fetches the next row of a query result set, returning a single sequence, or None when no more data is available. | python.library.sqlite3#sqlite3.Cursor.fetchone |
lastrowid
This read-only attribute provides the rowid of the last modified row. It is only set if you issued an INSERT or a REPLACE statement using the execute() method. For operations other than INSERT or REPLACE or when executemany() is called, lastrowid is set to None. If the INSERT or REPLACE statement failed to ... | python.library.sqlite3#sqlite3.Cursor.lastrowid |
rowcount
Although the Cursor class of the sqlite3 module implements this attribute, the database engine’s own support for the determination of “rows affected”/”rows selected” is quirky. For executemany() statements, the number of modifications are summed up into rowcount. As required by the Python DB API Spec, the ro... | python.library.sqlite3#sqlite3.Cursor.rowcount |
exception sqlite3.DatabaseError
Exception raised for errors that are related to the database. | python.library.sqlite3#sqlite3.DatabaseError |
sqlite3.enable_callback_tracebacks(flag)
By default you will not get any tracebacks in user-defined functions, aggregates, converters, authorizer callbacks etc. If you want to debug them, you can call this function with flag set to True. Afterwards, you will get tracebacks from callbacks on sys.stderr. Use False to d... | python.library.sqlite3#sqlite3.enable_callback_tracebacks |
exception sqlite3.Error
The base class of the other exceptions in this module. It is a subclass of Exception. | python.library.sqlite3#sqlite3.Error |
exception sqlite3.IntegrityError
Exception raised when the relational integrity of the database is affected, e.g. a foreign key check fails. It is a subclass of DatabaseError. | python.library.sqlite3#sqlite3.IntegrityError |
exception sqlite3.NotSupportedError
Exception raised in case a method or database API was used which is not supported by the database, e.g. calling the rollback() method on a connection that does not support transaction or has transactions turned off. It is a subclass of DatabaseError. | python.library.sqlite3#sqlite3.NotSupportedError |
exception sqlite3.OperationalError
Exception raised for errors that are related to the database’s operation and not necessarily under the control of the programmer, e.g. an unexpected disconnect occurs, the data source name is not found, a transaction could not be processed, etc. It is a subclass of DatabaseError. | python.library.sqlite3#sqlite3.OperationalError |
sqlite3.PARSE_COLNAMES
This constant is meant to be used with the detect_types parameter of the connect() function. Setting this makes the SQLite interface parse the column name for each column it returns. It will look for a string formed [mytype] in there, and then decide that ‘mytype’ is the type of the column. It ... | python.library.sqlite3#sqlite3.PARSE_COLNAMES |
sqlite3.PARSE_DECLTYPES
This constant is meant to be used with the detect_types parameter of the connect() function. Setting it makes the sqlite3 module parse the declared type for each column it returns. It will parse out the first word of the declared type, i. e. for “integer primary key”, it will parse out “intege... | python.library.sqlite3#sqlite3.PARSE_DECLTYPES |
exception sqlite3.ProgrammingError
Exception raised for programming errors, e.g. table not found or already exists, syntax error in the SQL statement, wrong number of parameters specified, etc. It is a subclass of DatabaseError. | python.library.sqlite3#sqlite3.ProgrammingError |
sqlite3.register_adapter(type, callable)
Registers a callable to convert the custom Python type type into one of SQLite’s supported types. The callable callable accepts as single parameter the Python value, and must return a value of the following types: int, float, str or bytes. | python.library.sqlite3#sqlite3.register_adapter |
sqlite3.register_converter(typename, callable)
Registers a callable to convert a bytestring from the database into a custom Python type. The callable will be invoked for all database values that are of the type typename. Confer the parameter detect_types of the connect() function for how the type detection works. Not... | python.library.sqlite3#sqlite3.register_converter |
class sqlite3.Row
A Row instance serves as a highly optimized row_factory for Connection objects. It tries to mimic a tuple in most of its features. It supports mapping access by column name and index, iteration, representation, equality testing and len(). If two Row objects have exactly the same columns and their me... | python.library.sqlite3#sqlite3.Row |
keys()
This method returns a list of column names. Immediately after a query, it is the first member of each tuple in Cursor.description. | python.library.sqlite3#sqlite3.Row.keys |
sqlite3.sqlite_version
The version number of the run-time SQLite library, as a string. | python.library.sqlite3#sqlite3.sqlite_version |
sqlite3.sqlite_version_info
The version number of the run-time SQLite library, as a tuple of integers. | python.library.sqlite3#sqlite3.sqlite_version_info |
sqlite3.version
The version number of this module, as a string. This is not the version of the SQLite library. | python.library.sqlite3#sqlite3.version |
sqlite3.version_info
The version number of this module, as a tuple of integers. This is not the version of the SQLite library. | python.library.sqlite3#sqlite3.version_info |
exception sqlite3.Warning
A subclass of Exception. | python.library.sqlite3#sqlite3.Warning |
ssl — TLS/SSL wrapper for socket objects Source code: Lib/ssl.py This module provides access to Transport Layer Security (often known as “Secure Sockets Layer”) encryption and peer authentication facilities for network sockets, both client-side and server-side. This module uses the OpenSSL library. It is available on a... | python.library.ssl |
class ssl.AlertDescription
enum.IntEnum collection of ALERT_DESCRIPTION_* constants. New in version 3.6. | python.library.ssl#ssl.AlertDescription |
ssl.ALERT_DESCRIPTION_HANDSHAKE_FAILURE
ssl.ALERT_DESCRIPTION_INTERNAL_ERROR
ALERT_DESCRIPTION_*
Alert Descriptions from RFC 5246 and others. The IANA TLS Alert Registry contains this list and references to the RFCs where their meaning is defined. Used as the return value of the callback function in SSLContext.se... | python.library.ssl#ssl.ALERT_DESCRIPTION_HANDSHAKE_FAILURE |
ssl.ALERT_DESCRIPTION_HANDSHAKE_FAILURE
ssl.ALERT_DESCRIPTION_INTERNAL_ERROR
ALERT_DESCRIPTION_*
Alert Descriptions from RFC 5246 and others. The IANA TLS Alert Registry contains this list and references to the RFCs where their meaning is defined. Used as the return value of the callback function in SSLContext.se... | python.library.ssl#ssl.ALERT_DESCRIPTION_INTERNAL_ERROR |
exception ssl.CertificateError
An alias for SSLCertVerificationError. Changed in version 3.7: The exception is now an alias for SSLCertVerificationError. | python.library.ssl#ssl.CertificateError |
ssl.CERT_NONE
Possible value for SSLContext.verify_mode, or the cert_reqs parameter to wrap_socket(). Except for PROTOCOL_TLS_CLIENT, it is the default mode. With client-side sockets, just about any cert is accepted. Validation errors, such as untrusted or expired cert, are ignored and do not abort the TLS/SSL handsh... | python.library.ssl#ssl.CERT_NONE |
ssl.CERT_OPTIONAL
Possible value for SSLContext.verify_mode, or the cert_reqs parameter to wrap_socket(). In client mode, CERT_OPTIONAL has the same meaning as CERT_REQUIRED. It is recommended to use CERT_REQUIRED for client-side sockets instead. In server mode, a client certificate request is sent to the client. The... | python.library.ssl#ssl.CERT_OPTIONAL |
ssl.CERT_REQUIRED
Possible value for SSLContext.verify_mode, or the cert_reqs parameter to wrap_socket(). In this mode, certificates are required from the other side of the socket connection; an SSLError will be raised if no certificate is provided, or if its validation fails. This mode is not sufficient to verify a ... | python.library.ssl#ssl.CERT_REQUIRED |
ssl.cert_time_to_seconds(cert_time)
Return the time in seconds since the Epoch, given the cert_time string representing the “notBefore” or “notAfter” date from a certificate in "%b %d %H:%M:%S %Y %Z" strptime format (C locale). Here’s an example: >>> import ssl
>>> timestamp = ssl.cert_time_to_seconds("Jan 5 09:34:4... | python.library.ssl#ssl.cert_time_to_seconds |
ssl.CHANNEL_BINDING_TYPES
List of supported TLS channel binding types. Strings in this list can be used as arguments to SSLSocket.get_channel_binding(). New in version 3.3. | python.library.ssl#ssl.CHANNEL_BINDING_TYPES |
ssl.create_default_context(purpose=Purpose.SERVER_AUTH, cafile=None, capath=None, cadata=None)
Return a new SSLContext object with default settings for the given purpose. The settings are chosen by the ssl module, and usually represent a higher security level than when calling the SSLContext constructor directly. caf... | python.library.ssl#ssl.create_default_context |
ssl.DER_cert_to_PEM_cert(DER_cert_bytes)
Given a certificate as a DER-encoded blob of bytes, returns a PEM-encoded string version of the same certificate. | python.library.ssl#ssl.DER_cert_to_PEM_cert |
ssl.enum_certificates(store_name)
Retrieve certificates from Windows’ system cert store. store_name may be one of CA, ROOT or MY. Windows may provide additional cert stores, too. The function returns a list of (cert_bytes, encoding_type, trust) tuples. The encoding_type specifies the encoding of cert_bytes. It is eit... | python.library.ssl#ssl.enum_certificates |
ssl.enum_crls(store_name)
Retrieve CRLs from Windows’ system cert store. store_name may be one of CA, ROOT or MY. Windows may provide additional cert stores, too. The function returns a list of (cert_bytes, encoding_type, trust) tuples. The encoding_type specifies the encoding of cert_bytes. It is either x509_asn for... | python.library.ssl#ssl.enum_crls |
ssl.get_default_verify_paths()
Returns a named tuple with paths to OpenSSL’s default cafile and capath. The paths are the same as used by SSLContext.set_default_verify_paths(). The return value is a named tuple DefaultVerifyPaths:
cafile - resolved path to cafile or None if the file doesn’t exist,
capath - resolve... | python.library.ssl#ssl.get_default_verify_paths |
ssl.get_server_certificate(addr, ssl_version=PROTOCOL_TLS, ca_certs=None)
Given the address addr of an SSL-protected server, as a (hostname, port-number) pair, fetches the server’s certificate, and returns it as a PEM-encoded string. If ssl_version is specified, uses that version of the SSL protocol to attempt to con... | python.library.ssl#ssl.get_server_certificate |
ssl.HAS_ALPN
Whether the OpenSSL library has built-in support for the Application-Layer Protocol Negotiation TLS extension as described in RFC 7301. New in version 3.5. | python.library.ssl#ssl.HAS_ALPN |
ssl.HAS_ECDH
Whether the OpenSSL library has built-in support for the Elliptic Curve-based Diffie-Hellman key exchange. This should be true unless the feature was explicitly disabled by the distributor. New in version 3.3. | python.library.ssl#ssl.HAS_ECDH |
ssl.HAS_NEVER_CHECK_COMMON_NAME
Whether the OpenSSL library has built-in support not checking subject common name and SSLContext.hostname_checks_common_name is writeable. New in version 3.7. | python.library.ssl#ssl.HAS_NEVER_CHECK_COMMON_NAME |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.