fscache-0.3.0
توضیحات
A Python package for caching data in the file system.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | fscache-0.3.0 |
| نام | fscache |
| نسخه کتابخانه | 0.3.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Ramiro Gómez |
| ایمیل نویسنده | code@ramiro.org |
| آدرس صفحه اصلی | https://github.com/yaph/fscache |
| آدرس اینترنتی | https://pypi.org/project/fscache/ |
| مجوز | MIT license |
# 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/)
نحوه نصب
نصب پکیج whl fscache-0.3.0:
pip install fscache-0.3.0.whl
نصب پکیج tar.gz fscache-0.3.0:
pip install fscache-0.3.0.tar.gz