A python library for memoizing functions for quick debugging/translations
Project description
MemoFN
A python library for memoizing functions for quick debugging/translations.
Usage
from memofn import memofn, load_cache, save_cache
def fib(n):
if n < 2:
return n
return fib(n-1) + fib(n-2)
load_cache('fib.cache.pkl')
mfib = memofn(expire_in_days=9)(fib)
mfib(10)
save_cache('fib.cache.pkl')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
memofn-0.1.0.tar.gz
(3.8 kB
view details)
Built Distribution
File details
Details for the file memofn-0.1.0.tar.gz
.
File metadata
- Download URL: memofn-0.1.0.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.10.8 Linux/6.0.5-arch1-1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b010364b960f2eea3e4fc11e02552580fbb9ea696edb2830b68cfaf54b531d0 |
|
MD5 | 275c47c8ee6ba1b219dd8542c29cf1f5 |
|
BLAKE2b-256 | 6f81662b883c7d18f123e54bcf2825df4fd389b7bf04c51f96ec4d535a116a1b |
File details
Details for the file memofn-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: memofn-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.10.8 Linux/6.0.5-arch1-1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f07738a6d79744eacac4b43de23fb3db12723ea780a7dbcf90b430e5c4cd143c |
|
MD5 | a4e1917044372574179a1c663c95fb22 |
|
BLAKE2b-256 | c69872ead0cde650454ecea4389fdd51f680fb89009b15d7113fdac98ed5c32e |