Skip to main content
bottle-memcache-decorator
=========================

This bottle-memcache-decorator plugin adds a memcache decorator in your Bottle
application. It automatically stores the route result to memcache for routes
where the bottle-memcache plugin is enabled.


Required
===============

The bottle-extras and bottle_memcache plugins are required to be installed before this plugin.


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

Install with one of the following commands::

$ pip install bottle-memcache-decorator
$ easy_install bottle-memcache-decorator

or download the latest version from github::

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


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

import bottle
from bottle.ext import memcache
from bottle_memcache_decorator import MemcacheDecoratorPlugin

app = bottle.Bottle()

keyword = 'mc'

# install memcache plugin
memcache_plugin = memcache.MemcachePlugin(keyword=keyword)
app.install(memcache_plugin)

# install the memcache decorator
memcache_decorator_plugin = MemcacheDecoratorPlugin(
memcache_keyword=keyword,
memcache_expire_time='mc_expire_time',
memcache_compress_level_keyword='mc_compress_level')
app.install(memcache_decorator_plugin)

# for example in this route we will set the expire time = 3600 sec
# and compression level = 3
@app.get('/:name', mc_expire_time=3600, mc_dec_compress_level=3)
def show(name, mc):
# your code here

return result

if __name__ == '__main__':
run(app, host='0.0.0.0', port=8080, debug=True)


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

MemcacheDecoratorPlugin(
memcache_keyword='mc',
memcache_expire_time='mc_expire_time',
memcache_compress_level_keyword='mc_compress_level')

**memcache_keyword**: is the keyword set/used for the memcache plugin

**memcache_expire_time**: defines the router argument responsible for setting the memcache expire time

**memcache_compress_level_keyword**: defines the router argument responsible for setting the memcache compression level

Metadata

Release files for bottle-memcache-decorator 0.0.1

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-decorator 0.0.1
File Size Uploaded Provenance Actions
bottle-memcache-decorator-0.0.1.tar.gz 4.2 kB Without provenance Details for bottle-memcache-decorator-0.0.1.tar.gz

Release files / bottle-memcache-decorator-0.0.1.tar.gz

Download URL bottle-memcache-decorator-0.0.1.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
6865e99330d282605e90d0eff3eb5a26af30f9f6e0dbcfac7e3ad56dd32d9bc8
BLAKE2b-256 checksum
How to use checksums
2c58443bef2153f2f9c1315f9d646773fa403cc5c17847c6a3e92456c73ad3d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for bottle-memcache-decorator 0.0.1

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