fscache


Namefscache JSON
Version 0.4.0 PyPI version JSON
download
home_pagehttps://github.com/yaph/fscache
SummaryA Python package for caching data in the file system.
upload_time2023-11-26 23:45:41
maintainer
docs_urlNone
authorRamiro Gómez
requires_python
licenseMIT license
keywords cache caching file system
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # fscache

**fscache** is a Python package for caching data in the file system.

## Installation

```sh
pip install fscache
```

## Usage

```python
import requests
from fscache import fscache

url = 'https://example.com/index.html'
cache_file = fscache.path(url, cache_dir='.fscache')

if fscache.valid(cache_file, lifetime=3600):
    content = fscache.load(cache_file)
    # Do something with content
else:
    content = requests.get(url).text
    # Save content in .fscache/https/example.com/index.html
    fscache.save(cache_file, content)
```

## License

[MIT](LICENSE) © [Ramiro Gómez](https://ramiro.org/)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/yaph/fscache",
    "name": "fscache",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "cache,caching,file system",
    "author": "Ramiro G\u00f3mez",
    "author_email": "code@ramiro.org",
    "download_url": "https://files.pythonhosted.org/packages/ab/72/95a8267b5a010912765ec57cd42cc136d7db59c2c7b073ffd81fcbbc8c7d/fscache-0.4.0.tar.gz",
    "platform": null,
    "description": "# fscache\n\n**fscache** is a Python package for caching data in the file system.\n\n## Installation\n\n```sh\npip install fscache\n```\n\n## Usage\n\n```python\nimport requests\nfrom fscache import fscache\n\nurl = 'https://example.com/index.html'\ncache_file = fscache.path(url, cache_dir='.fscache')\n\nif fscache.valid(cache_file, lifetime=3600):\n    content = fscache.load(cache_file)\n    # Do something with content\nelse:\n    content = requests.get(url).text\n    # Save content in .fscache/https/example.com/index.html\n    fscache.save(cache_file, content)\n```\n\n## License\n\n[MIT](LICENSE) \u00a9 [Ramiro G\u00f3mez](https://ramiro.org/)\n",
    "bugtrack_url": null,
    "license": "MIT license",
    "summary": "A Python package for caching data in the file system.",
    "version": "0.4.0",
    "project_urls": {
        "Homepage": "https://github.com/yaph/fscache"
    },
    "split_keywords": [
        "cache",
        "caching",
        "file system"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "79b796c2e589a0273363a81fe8db674da38f92128fd506e4b76cc30962ba443e",
                "md5": "4d29fe6db459c8c946d7a250aac784d8",
                "sha256": "fc3eb0849142e82b9c6d0b1354b41d724e044c3dda7cdc1c21a72d43ad661067"
            },
            "downloads": -1,
            "filename": "fscache-0.4.0-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4d29fe6db459c8c946d7a250aac784d8",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 5634,
            "upload_time": "2023-11-26T23:45:39",
            "upload_time_iso_8601": "2023-11-26T23:45:39.346168Z",
            "url": "https://files.pythonhosted.org/packages/79/b7/96c2e589a0273363a81fe8db674da38f92128fd506e4b76cc30962ba443e/fscache-0.4.0-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ab7295a8267b5a010912765ec57cd42cc136d7db59c2c7b073ffd81fcbbc8c7d",
                "md5": "c07f72af897e1860ddbeb9b2844ea739",
                "sha256": "79a00c70c669d1f8312ed7880835a3fcbe1a97e3d78c7f46520e7f9e405ad523"
            },
            "downloads": -1,
            "filename": "fscache-0.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "c07f72af897e1860ddbeb9b2844ea739",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 7859,
            "upload_time": "2023-11-26T23:45:41",
            "upload_time_iso_8601": "2023-11-26T23:45:41.066919Z",
            "url": "https://files.pythonhosted.org/packages/ab/72/95a8267b5a010912765ec57cd42cc136d7db59c2c7b073ffd81fcbbc8c7d/fscache-0.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-26 23:45:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "yaph",
    "github_project": "fscache",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "fscache"
}
        
Elapsed time: 0.14878s