Skip to main content
=====================
Bottle-Memcache
=====================

Memcache is a general-purpose distributed memory caching system that was
originally developed by Danga Interactive for LiveJournal, but is now used
by many other sites.

This plugin simplifies the use of memcache in your Bottle applications.
Once installed, all you have to do is to add a ``mc`` keyword argument
(configurable) to route callbacks that need a memcache connection.

Installation
===============

Install with one of the following commands::

$ pip install bottle-memcache
$ easy_install bottle-memcache

or download the latest version from github::

$ git clone git://github.com/bottlepy/bottle-extras.git
$ cd bottle-extras/memcache
$ python setup.py install

Usage
===============

Once installed to an application, the plugin passes an open
:class:`memcache.Client` instance to all routes that require an
``mc`` keyword argument::

import bottle

app = bottle.Bottle()
plugin = bottle.ext.memcache.MemcachePlugin(servers=['localhost:11211'])
app.install(plugin)

@app.route('/show/:item')
def show(item, mc):
val = mc.get('item_key')
if not val:
mc.set('item_key', item)
val = mc.get('item_key')
return template('showitem', item=val)

Routes that do not expect an ``mc`` keyword argument are not affected.

Configuration
=============

The following configuration options exist for the plugin class:

* **servers**: A list of server:port items to connect to (default: ['localhost:11211',])
* **timeout**: The timeout value in seconds when connecting (default: 3)
* **keyword**: The keyword argument name that triggers the plugin (default: 'mc').

Metadata

Release files for bottle-memcache 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bottle-memcache 0.2
File Size Uploaded Provenance Actions
bottle-memcache-0.2.tar.gz 2.5 kB Without provenance Details for bottle-memcache-0.2.tar.gz

Release files / bottle-memcache-0.2.tar.gz

Download URL bottle-memcache-0.2.tar.gz
Size 2.5 kB
Tags Source
SHA-256 checksum
How to use checksums
ccc2d9a8b6cb0a61459678e32e7604fa97a7d378747fe203b24d5416ee041c77
BLAKE2b-256 checksum
How to use checksums
aa8f95e2252910d586d80365b160bf4207aedd59f674d40a3707a4a59b479062
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for bottle-memcache 0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page