fastapi-caching-0.3.0
توضیحات
Cache library for FastAPI with tag based invalidation
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | fastapi-caching-0.3.0 |
| نام | fastapi-caching |
| نسخه کتابخانه | 0.3.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Jacob Magnusson |
| ایمیل نویسنده | m@jacobian.se |
| آدرس صفحه اصلی | https://github.com/jmagnusson/fastapi-caching |
| آدرس اینترنتی | https://pypi.org/project/fastapi-caching/ |
| مجوز | MIT |
# FastAPI-Caching
Cache library for FastAPI with tag based invalidation. Asynchronous only for the time being.
## Features
- Automatic response cache fetching using FastAPI dependencies
- Fine-grained control over when to return and set the cache
- Ability to invalidate cached objects based on a concept of associated tags. See [examples/redis_app](/examples/redis_app) for an example.
## Installation
With in-memory support only:
```bash
pip install fastapi-caching
```
NOTE: In-memory backend is only recommended when your app is only run as a single instance.
With redis support (through the [aioredis](https://aioredis.readthedocs.io/) library):
```bash
pip install fastapi-caching[redis]
```
## Usage examples
Examples on how to use [can be found here](/examples).
## Limitations
- Only supported within async contexts.
## Changelog
### v0.1.2, 2020-08-16
- Feature: Support lazy setup of cache manager
### v0.2.0, 2020-08-16
- Breaking change: Revert to requiring `backend` to be passed to CacheManager
- Feature: Support lazy configuration of the caching backend
### v0.3.0, 2020-08-16
- Feature: Add functionality to disable (and re-enable) caching.
نیازمندی
| مقدار | نام |
|---|---|
| - | fastapi |
| - | cachetools |
| - | aioredis |
| ==0.11.5 | uvicorn |
| - | databases[sqlite] |
| >=5.4.0 | pytest |
| - | pytest-cov |
| - | pytest-asyncio |
| - | requests |
| - | httpx |
| - | fakeredis |
| - | lupa |
| - | black |
| - | isort |
| <0.7,>=0.6 | watchgod |
| - | black |
| - | isort |
| <0.7,>=0.6 | watchgod |
| ==0.11.5 | uvicorn |
| - | databases[sqlite] |
| - | aioredis |
| >=5.4.0 | pytest |
| - | pytest-cov |
| - | pytest-asyncio |
| - | requests |
| - | httpx |
| - | fakeredis |
| - | lupa |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6 | Python |
نحوه نصب
نصب پکیج whl fastapi-caching-0.3.0:
pip install fastapi-caching-0.3.0.whl
نصب پکیج tar.gz fastapi-caching-0.3.0:
pip install fastapi-caching-0.3.0.tar.gz