The TLS configuration options for pymongo.mongo_client.MongoClient() are in the form of keyword arguments (for example, **kwargs). Here is a summary of the possible key/value pairs:
Key | Value |
host | Typically, the DNS address of the server running the mongod instance to which you want to connect. It's extremely important that the hostname specified here matches one of the DNS settings in the [ alt_names ] section of the configuration file used to generate the server certificate. |
tls | Set this key to True if you wish to have the client connect via TLS. The default is False. |
tlsCAFile | Specifies the certificate authority file, typically in PEM format. |
tlsCertificateKeyFile | Specifies the file containing the client certificate and private key, signed by the certificate authority (CA) specified previously. |
tlsAllowInvalidCertificates | If this option is set to True, it instructs MongoDB to allow the connection to be made... |