Skip to main content

Store function results across executions using cache files

Project description

File Memoizaer

Tests Linter Security Release

This Python package makes it easy to store function results across executions using cache files.

Prerequisites

Installation is via pip:

pip install file-memoizer

Usage

Basic usage is as follows:

import file_memoizer

file_memoizer.memoize()
def double(n):
    return 2 * n

class Arithmetic():

    @staticmethod
    @file_memoizer.memoize()
    def triple(n):
         return 3 * n
    
    @file_memoizer.memoize(ignore_unhashable_params=True)
    def multiply(self, x, y):
        return x * y

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

file_memoizer-0.0.2.tar.gz (2.6 kB view hashes)

Uploaded Source

Built Distribution

file_memoizer-0.0.2-py3-none-any.whl (2.7 kB view hashes)

Uploaded Python 3

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