Skip to main content

Add cache to lambda-proxy

Project description

lambda-proxy-cache

Packaging status CircleCI codecov

Add a caching layer to lambda-proxy

Install

$ pip install -U pip
$ pip install lambda-proxy-cache

Or install from source:

$ git clone https://github.com/vincentsarago/lambda-proxy-cache.git
$ cd lambda-proxy
$ pip install -U pip
$ pip install -e .

Usage

from lambda_proxy_cache.proxy import API
from lambda_proxy_cache.backends.memcache import MemcachedCache

cache = MemcachedCache()
APP = API(name="app", cache_layer=cache)

@APP.route('/test/tests/<id>', methods=['GET'], cors=True)
def print_id(id):
    return ('OK', 'plain/text', id)

Contribution & Devellopement

Issues and pull requests are more than welcome.

Dev install & Pull-Request

$ git clone https://github.com/vincentsarago/lambda-proxy-cache.git
$ cd lambda-proxy-cache
$ pip install -e .[dev]

This repo is set to use pre-commit to run flake8, pydocstring and black ("uncompromising Python code formatter") when committing new code.

$ pre-commit install
$ git add .
$ git commit -m'my change'
   black.........................Passed
   Flake8........................Passed
   Verifying PEP257 Compliance...Passed
$ git push origin

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lambda-proxy-cache-0.0.1.dev1.tar.gz (4.8 kB view details)

Uploaded Source

File details

Details for the file lambda-proxy-cache-0.0.1.dev1.tar.gz.

File metadata

  • Download URL: lambda-proxy-cache-0.0.1.dev1.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.2

File hashes

Hashes for lambda-proxy-cache-0.0.1.dev1.tar.gz
Algorithm Hash digest
SHA256 0fa264463676896d12a82c0ce077dcb43af2a331fcc92aad675e3e2bc0b88e08
MD5 2511177a7c245d975501d989baec2b6b
BLAKE2b-256 1ac2ece9c31fc338ed7ca1e3dea820e3f70dcb7ab497752edcd1946ee6e9446a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page