
Product
Introducing Scala and Kotlin Support in Socket
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
python-binary-memcached
Advanced tools
A pure python module to access memcached via its binary protocol with SASL auth support
A pure python module (thread safe) to access memcached via it's binary with SASL auth support.
The main purpose of this module it to be able to communicate with memcached using binary protocol and support authentication, so it can work with Heroku for example.
Latest compiled docs on Read The Docs here <https://python-binary-memcached.readthedocs.org>
_.
Use pip or easy_install.
.. code-block:: bash
pip install python-binary-memcached
.. code-block:: python
import bmemcached
client = bmemcached.Client(('127.0.0.1:11211', ), 'user',
'password')
client.set('key', 'value')
print(client.get('key'))
Using it with distributed keys
.. code-block:: python
import bmemcached
client = bmemcached.DistributedClient(
('127.0.0.1:11211', ), 'user', 'password'
)
client.set('key', 'value')
print(client.get('key'))
python-binary-memcached
unit tests are found in the test/
directory
and are designed to be run using pytest
. pytest
will discover the tests
automatically, so all you have to do is:
.. code-block:: console
$ pytest
...
170 passed in 4.43 seconds
This runs the tests with the default Python interpreter.
You can also verify that the tests pass on other supported Python interpreters.
For this we use tox
, which will automatically create a virtualenv
for
each supported Python version and run the tests. For example:
.. code-block:: console
$ tox
...
py27: commands succeeded
ERROR: py34: InterpreterNotFound: python3.4
py35: commands succeeded
py36: commands succeeded
py37: commands succeeded
py38: commands succeeded
You may not have all the required Python versions installed, in which case you
will see one or more InterpreterNotFound
errors.
If you want to use it with Django, go to django-bmemcached <https://github.com/jaysonsantos/django-bmemcached>
_ to get a Django backend.
.. image:: https://travis-ci.org/jaysonsantos/python-binary-memcached.png?branch=master :target: https://travis-ci.org/jaysonsantos/python-binary-memcached
.. _pytest
: https://pypi.org/project/pytest/
.. _tox
: https://pypi.org/project/tox/
default
and time
protocol arguments in
client class (#243).. _section-1:
.. _section-2:
.. _section-3:
.. _section-4:
.. _section-5:
.. _section-6:
.. _section-7:
FAQs
A pure python module to access memcached via its binary protocol with SASL auth support
We found that python-binary-memcached demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
Application Security
/Security News
Socket CEO Feross Aboukhadijeh and a16z partner Joel de la Garza discuss vibe coding, AI-driven software development, and how the rise of LLMs, despite their risks, still points toward a more secure and innovative future.
Research
/Security News
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.