Skip to main content

Nick's library of extraneous utils

Project description

kimegitee

niq

Available utilities:

  • Cache function calls results on disk

Installation

pip install niq

Usage

from niq import cache

@cache
def f():
    pass

By default the cache decorator saves the function result in ~/.niq and loads it if environment variable NIQ_CACHE is set to 1.

You can customize cache location with the cache_dir parameter

@cache(cache_dir='/path/to/custom/cache_dir')
def f():
    pass

Tests

Tests are available under tests/, use pytest to run them

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

niq-1.2.2.tar.gz (2.7 kB view hashes)

Uploaded Source

Built Distribution

niq-1.2.2-py3-none-any.whl (3.4 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