Metadata-Version: 1.2
Name: cachalot
Version: 0.1.1
Summary: Minimal persistent memoization cache
Home-page: http://gitlab.com/radek-sprta/cachalot
Author: Radek Sprta
Author-email: mail@radeksprta.eu
License: MIT License
Download-URL: https://gitlab.com/radek-sprta/cachalot/repository/archive.tar.gz?ref=master
Description-Content-Type: UNKNOWN
Description: Cachalot |PyPI version| |Pipeline status| |Coverage report|
        ===========================================================
        
        Cachalot is a minimal persistent memoization cache. It provides a
        decorator, that stores function result for future use. Perfect for heavy
        computations and I/O operation (such as web requests). On backend, it
        uses TinyDB for storage.
        
        Features
        --------
        
        -  Simple usage via decorator
        -  Persistent caching
        -  Key expiration
        -  Maximum cache size, to prevent bloat
        
        Installation
        ------------
        
        Cachalot requires Python 3.5 or newer to run.
        
        **Python package**
        
        You can easily install Cachalot using pip:
        
        ``pip3 install cachalot``
        
        **Manual**
        
        Alternatively, to get the latest development version, you can clone this
        repository and then manually install it:
        
        ::
        
            git clone git@gitlab.com:radek-sprta/cachalot.git
            cd cachalot
            python3 setup.py install
        
        Usage
        -----
        
        .. code:: python
        
            from cachalot import Cache
        
            @Cache()
            def expensive_function():
                return expensive_calculation()
        
        Advanced usage
        ~~~~~~~~~~~~~~
        
        .. code:: python
        
            from cachalot import Cache
        
            @Cache(path='cache.json', timeout=3600, size=5000)
            def expensive_function():
                return expensive_calculation()
        
        -  ``path``: Path to the database file. Defaults to .cache.json.
        -  ``timeout``: How long should the data be cached in seconds. Defaults
           to 86400 (1 day).
        -  ``size``: Maximum number of keys cached. Defaults to 10000.
        
        For more information, see
        `documentation <https://radek-sprta.gitlab.io/cachalot>`__.
        
        TODO
        ----
        
        -  Test suite
        -  Optionally retry if blank data is returned
        
        Contributing
        ------------
        
        For information on how to contribute to the project, please check the
        `Contributor's
        Guide <https://gitlab.com/radek-sprta/cachalot/blob/master/CONTRIBUTING.md>`__
        
        Contact
        -------
        
        mail@radeksprta.eu
        
        `incoming+radek-sprta/cachalot@gitlab.com <incoming+radek-sprta/cachalot@gitlab.com>`__
        
        License
        -------
        
        MIT License
        
        Credits
        -------
        
        This package was created with
        `Cookiecutter <https://github.com/audreyr/cookiecutter>`__ and the
        `python-cookiecutter <https://gitlab.com/radek-sprta/python-cookiecutter>`__
        project template. Inspired by
        `Cashier <https://github.com/atmb4u/cashier>`__
        
        .. |PyPI version| image:: https://badge.fury.io/py/cachalot.svg
           :target: https://badge.fury.io/py/cachalot
        .. |Pipeline status| image:: https://gitlab.com/radek-sprta/cachalot/badges/master/pipeline.svg
           :target: https://gitlab.com/radek-sprta/cachalot/commits/master
        .. |Coverage report| image:: https://gitlab.com/radek-sprta/cachalot/badges/master/coverage.svg
           :target: https://gitlab.com/radek-sprta/cachalot/commits/master
        
Keywords: cachalot
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Operating System :: OS Independent
Classifier: Natural Language :: English
Classifier: Topic :: Database
Classifier: Topic :: Software Development :: Libraries
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Requires-Python: >=3.5
