• Stars
    star
    163
  • Rank 231,141 (Top 5 %)
  • Language
    Python
  • License
    MIT License
  • Created about 13 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A pure python module (thread safe) to access memcached via it's binary protocol with SASL auth support.

Introduction to bmemcached

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.

Installing

Use pip or easy_install.

pip install python-binary-memcached

Using

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

import bmemcached
client = bmemcached.DistributedClient(
    ('127.0.0.1:11211', ), 'user', 'password'
)
client.set('key', 'value')
print(client.get('key'))

Testing

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:

$ 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:

$ 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.

Using with Django

If you want to use it with Django, go to django-bmemcached to get a Django backend.

Tests Status

https://travis-ci.org/jaysonsantos/python-binary-memcached.png?branch=master

More Repositories

1

jinja-assets-compressor

A Jinja extension (compatible with Flask and other frameworks) to compile and/or compress your assets.
Python
93
star
2

captcha-breaker

A simple machine learning powered captcha breaker
Jupyter Notebook
42
star
3

django-bmemcached

A django cache backend to use bmemcached module which supports memcached binary protocol with authentication.
Python
38
star
4

bmemcached-rs

Rust binary memcached implementation
Rust
26
star
5

django-uwsgi-mail

A backend to queue django e-mails in uWSGI spool
Python
20
star
6

python-async-memcached-server

A pure python and async memcached server
Python
19
star
7

url-parser-c

A simple C URL parser made for study purposes
C
10
star
8

mambembe

Rust
9
star
9

SambaManager

A Samba manager to add shares, users and groups. Written in python and django.
Python
9
star
10

csv-query-rs

Make SQL queries on CSV files
Rust
8
star
11

there-i-fixed-it

Rust
7
star
12

jquery-twitter-fetcher

A jQuery plugin to fetch tweets from a person or it's list.
JavaScript
7
star
13

cli-utils-rs

Rust
3
star
14

structs

Python Structs for Humans
Python
3
star
15

iso2usb4mac

Convert ISO files to USB Flashes
Shell
3
star
16

kustomize-sops-rs

Kustomize (exec) plugin to generate secrets/config map from encrypted .env files and simple decrypter
Rust
3
star
17

dd-wrt-wol

Wake On Lan over the internet without port forwarding
Rust
2
star
18

dotfiles-old

my dotfiles and stuff
Shell
2
star
19

flash-card-generator

Python
2
star
20

librusty-platter

Fuse* encrypted folders on remote systems like Dropbox and others
Rust
2
star
21

bunderwar

My up-to date docker images with renovate and arm64/amd64 support
Earthly
1
star
22

docker-minecraft-infinity

Shell
1
star
23

germanize-telegram

Python
1
star
24

Extract-Flash-files-from-binaries

Python
1
star
25

flash-card-generator-frontend

TypeScript
1
star
26

docker-minecraft-ftb-direwolf20-1.10

FTB Presents Direwolf20 for Minecraft 1.10
Shell
1
star