From f35f21573ca816171e22b927925d76d5a47fc334 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mois=C3=A9s=20Guimar=C3=A3es=20de=20Medeiros?= Date: Tue, 7 Apr 2020 12:33:08 -0300 Subject: Add TLS support for TCP sockets (#276) --- docs/getting_started.rst | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'docs') diff --git a/docs/getting_started.rst b/docs/getting_started.rst index 4e1b9ef..25690e6 100644 --- a/docs/getting_started.rst +++ b/docs/getting_started.rst @@ -41,6 +41,30 @@ on if a server goes down. client.set('some_key', 'some value') result = client.get('some_key') + +Using TLS +--------- +**Memcached** `supports `_ +authentication and encryption via TLS since version **1.5.13**. + +A Memcached server running with TLS enabled will only accept TLS connections. + +To enable TLS in pymemcache, pass a valid TLS context to the client's +``tls_context`` parameter: + +.. code-block:: python + import ssl + from pymemcache.client.base import Client + + context = ssl.create_default_context( + cafile="my-ca-root.crt", + ) + + client = Client(('localhost', 11211), tls_context=context) + client.set('some_key', 'some_value') + result = client.get('some_key') + + Serialization -------------- -- cgit v1.2.1