Skip to content

Commit

Permalink
Merge pull request #3 from a-luna/patch-release/v0.1.1
Browse files Browse the repository at this point in the history
Patch release/v0.1.1
  • Loading branch information
a-luna authored Apr 22, 2021
2 parents cb16b60 + b6c19f7 commit 0f997ce
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
## `fastapi-redis-cache`

(badges, eventually)
[![PyPI version](https://badge.fury.io/py/fastapi-redis-cache.svg)](https://badge.fury.io/py/fastapi-redis-cache) ![PyPI - Downloads](https://img.shields.io/pypi/dm/fastapi-redis-cache?color=%234DC71F) ![PyPI - License](https://img.shields.io/pypi/l/fastapi-redis-cache?color=%25234DC71F) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/fastapi-redis-cache) [![Maintainability](https://api.codeclimate.com/v1/badges/4a1753c77add039c3850/maintainability)](https://codeclimate.com/github/a-luna/fastapi-redis-cache/maintainability) [![codecov](https://codecov.io/gh/a-luna/fastapi-redis-cache/branch/master/graph/badge.svg)](https://codecov.io/gh/a-luna/fastapi-redis-cache)


### Installation

`pip install fastapi-redis-cache`

### Usage


On startup, initialize the cache with the URL of the Redis server. The name of the custom header field used to identify cache hits/misses can also be customized. If `response_header` is not specified, the custom header field will be named `X-FastAPI-Cache`

```python
Expand Down Expand Up @@ -81,7 +81,6 @@ content-length: 65
content-type: text/plain; charset=utf-8
date: Wed, 21 Apr 2021 07:26:34 GMT
server: uvicorn

{
"message": "this data can be cached indefinitely",
"success": true
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from setuptools import find_packages, setup

DESCRIPTION = "`fastapi-redis-cache` provides a simple way to cache response data for API endpoints using Redis."
DESCRIPTION = "A simple and robust caching solution for FastAPI endpoints, fueled by the unfathomable power of Redis."
APP_ROOT = Path(__file__).parent
README = (APP_ROOT / "README.md").read_text().strip()
AUTHOR = "Aaron Luna"
Expand Down
3 changes: 2 additions & 1 deletion src/fastapi_redis_cache/redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from typing import Tuple

import redis
from fakeredis import FakeRedis
from pydantic import RedisDsn

from fastapi_redis_cache.enums import RedisStatus
Expand All @@ -25,4 +24,6 @@ def _connect(host_url: RedisDsn) -> Tuple[RedisStatus, redis.client.Redis]:


def _connect_fake() -> Tuple[RedisStatus, redis.client.Redis]:
from fakeredis import FakeRedis

return (RedisStatus.CONNECTED, FakeRedis())
2 changes: 1 addition & 1 deletion src/fastapi_redis_cache/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# flake8: noqa
__version_info__ = ("0", "1", "0")
__version_info__ = ("0", "1", "1")
__version__ = ".".join(__version_info__)

0 comments on commit 0f997ce

Please sign in to comment.