Metadata-Version: 2.4
Name: mezmorize
Version: 0.29.1
Summary: Adds function memoization support
Author-email: Reuben Cummings <reubano@gmail.com>
Maintainer-email: Reuben Cummings <reubano@gmail.com>
License-Expression: BSD-3-Clause
Project-URL: repository, https://github.com/reubano/mezmorize
Project-URL: download, https://github.com/reubano/mezmorize/archive/refs/heads/master.zip
Project-URL: bugtracker, https://github.com/reubano/mezmorize/issues
Keywords: memoize,memoization,Flask-Cache,cache
Classifier: Development Status :: 4 - Beta
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Environment :: Console
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Intended Audience :: Developers
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Microsoft :: Windows
Requires-Python: >=3.10.14
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: werkzeug<=2.0.0,>=1.0.1
Requires-Dist: cachelib<=0.2,>=0.1
Provides-Extra: dev
Requires-Dist: build[virtualenv]<2.0.0,>=1.3.0; extra == "dev"
Requires-Dist: click<9.0.0,>=8.1.7; extra == "dev"
Requires-Dist: pytest<9.0.0,>=8.4.2; extra == "dev"
Requires-Dist: pytest-cov<8.0.0,>=7.0.0; extra == "dev"
Requires-Dist: pytest-xdist[psutil]<4.0.0,>=3.8.0; extra == "dev"
Requires-Dist: pylint<3.0.0,>=2.4.4; extra == "dev"
Requires-Dist: ruff<0.14.0,>=0.13.1; extra == "dev"
Requires-Dist: tox<5.0.0,>=4.30.2; extra == "dev"
Requires-Dist: twine<4.0.0,>=3.1.1; extra == "dev"
Requires-Dist: virtualenv>=19.0.0; extra == "dev"
Provides-Extra: optional
Requires-Dist: pylibmc<2.0.0,>=1.5.2; extra == "optional"
Requires-Dist: python-binary-memcached<0.30.0,>=0.29.0; extra == "optional"
Requires-Dist: pymemcache<4.0.0,>=3.1.0; extra == "optional"
Requires-Dist: redis<4.0.0,>=3.4.1; extra == "optional"
Dynamic: license-file

mezmorize
=========

[![travis](https://travis-ci.org/reubano/mezmorize.svg?branch=master)](https://travis-ci.org/reubano/mezmorize)
<!-- [![Coverage Status](https://coveralls.io/repos/reubano/mezmorize/badge.png)](https://coveralls.io/r/reubano/mezmorize) -->
[![versions](https://img.shields.io/pypi/pyversions/mezmorize.svg)](https://pypi.python.org/pypi/mezmorize)
[![pypi](https://img.shields.io/pypi/v/mezmorize.svg)](https://pypi.python.org/pypi/mezmorize)
<!-- [![Documentation Status](https://readthedocs.org/projects/mezmorize/badge/?version=latest)](https://mezmorize.readthedocs.io/en/latest/?badge=latest) -->
[![license](https://img.shields.io/badge/license-BSD-yellow.svg)](https://github.com/reubano/mezmorize)
<!-- [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black) -->

A python function memoization library heavily inspired by Flask-Cache.

This is a fork of the [Flask-Cache](https://github.com/thadeusb/flask-cache) extension.

Setup
-----

mezmorize is available on PyPI and can be installed with:

    pip install mezmorize

Usage
-----

```python
from random import randrange

from mezmorize import Cache

cache = Cache(CACHE_TYPE='simple')


@cache.memoize(60)
def add(a, b):
    return a + b + randrange(0, 1000)

# Initial
add(2, 5)

# Memoized
add(2, 5)
add(2, 5)

# Delete cache
cache.delete_memoized(add)

# Initial
add(2, 5)
```

For more configuration options, check out the the [examples](https://github.com/reubano/mezmorize/blob/master/examples/hello.py) or [Flask-Caching documentation](https://flask-caching.readthedocs.io).

Compatibility with Flask-Cache and Flask-Caching
-----
There are no known incompatibilities or breaking changes between either the latest [Flask-Cache v0.13](https://github.com/thadeusb/flask-cache)
or [Flask-Caching v1.8.0](https://github.com/sh4nks/flask-caching) and the current version of mezmorize.

Python versions
-----

Starting with version 0.26.0, mezmorize dropped Python 2 support. The library is tested against Python 3.11, 3.12, 3.13, and PyPy 3.10.

Environment Variables
---------------------
- *CACHE_DIR*: the directory your cache will be stored in. The default is the `cache` dir in the current folder.

Links
=====

* [Flask-Caching Documentation](https://flask-caching.readthedocs.io)
* [Source Code](https://github.com/reubano/mezmorize)
* [Issues](https://github.com/reubano/mezmorize/issues)
* [Current Flask-Caching Extension](https://github.com/sh4nks/flask-caching)
* [Original Flask-Cache Extension](https://github.com/thadeusb/flask-cache)
