-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
49 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
# 扩展 | ||
|
||
大部分基础较为常用的功能内置于`usepy`中,但是有一些功能并不是所有人都需要,所以我们将这些功能放在了插件中,这样可以保证`usepy`更加轻量化。 | ||
大部分基础较为常用的功能内置于`usepy`中,但是有一些功能并不是所有人都需要,所以我们将这些功能放在了扩展中,这样可以保证`usepy`更加轻量化。 | ||
|
||
## 扩展列表 | ||
|
||
- [use-rabbitmq](rabbitmq.md) | ||
- [use-redis](redis.md) | ||
- [use-logger](logger.md) | ||
- [use-notify](notify.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
title: use-redis | ||
outline: deep | ||
--- | ||
|
||
# use-redis | ||
|
||
::: code-group | ||
|
||
```bash [pip] | ||
pip install use-redis | ||
``` | ||
```bash [poetry] | ||
poetry add use-redis | ||
``` | ||
::: | ||
|
||
一个永不断线的Redis连接管理 | ||
|
||
|
||
### example | ||
|
||
```python | ||
from use_redis import useRedis | ||
|
||
rds = useRedis() | ||
``` | ||
|
||
if you use it with [usepy](https://github.com/use-py/usepy), you can use it like this: | ||
|
||
```python | ||
from usepy.plugin import useRedis | ||
|
||
rds = useRedis() | ||
``` |