Metadata-Version: 2.3
Name: pylhb4redis
Version: 1.0.0
Summary: Mr.Lee's Redis Helpers
Author: SoftGod4MrLi
Author-email: SoftGod4MrLi <596928288@qq.com>
License: Non-Commercial Use License
         
         Copyright (c) 2025 Mr.Lee
         
         Permission is hereby granted, free of charge, to any person obtaining a copy
         of this software and associated documentation files (the "Software"), to deal
         in the Software for non-commercial purposes only, including without limitation
         the rights to use, copy, modify, merge, publish, distribute, sublicense,
         and/or sell copies of the Software, subject to the following conditions:
         
         1. The above copyright notice and this permission notice shall be included in all
         copies or substantial portions of the Software.
         
         2. Commercial use of the Software is expressly prohibited without prior written
         permission from the copyright holder. For purposes of this license, commercial
         use means any use of the Software that is intended for or directed toward
         commercial advantage or monetary compensation.
         
         THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
         IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
         FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
         AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
         LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
         OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
         SOFTWARE.
Requires-Dist: redis>=8.0.0
Requires-Python: >=3.12
Project-URL: Homepage, https://github.com/SoftGod4MrLi/pylhb4redis
Project-URL: Documentation, https://github.com/SoftGod4MrLi/pylhb4redis
Project-URL: Repository, https://github.com/SoftGod4MrLi/pylhb4redis
Project-URL: Issues, https://github.com/SoftGod4MrLi/pylhb4redis/issues
Description-Content-Type: text/markdown

# pylhb4redis

[![PyPI version](https://img.shields.io/pypi/v/pylhb4redis.svg)](https://pypi.org/project/pylhb4redis/)
[![GitHub stars](https://img.shields.io/github/stars/SoftGod4MrLi/pylhb4redis?style=flat&logo=github)](https://github.com/SoftGod4MrLi/pylhb4redis)
[![GitHub license](https://img.shields.io/github/license/SoftGod4MrLi/pylhb4redis?style=flat)](https://github.com/SoftGod4MrLi/pylhb4redis/blob/main/LICENSE)
![GitHub repo size](https://img.shields.io/github/repo-size/SoftGod4MrLi/pylhb4redis?style=flat)
[![GitHub forks](https://img.shields.io/github/forks/SoftGod4MrLi/pylhb4redis?style=flat&logo=github)](https://github.com/SoftGod4MrLi/pylhb4redis)

pylhb4redis 是我在工作过程中陆续整理的一个 Python Redis 工具包，里面就放在一个关于Redis操作的类及相关函数。与其说是一个正式的开源项目，不如说是我自己的“代码杂物间”——只不过把它打包了一下，方便在不同项目之间复用。

> 由于是个人使用为主，很多设计可能带着比较强的个人习惯，也未必是最优解。如果您发现了问题或有更好的建议，非常欢迎指正。

## 安装

```
pip install pylhb4redis
```

## 🌺mypymssql模块

Redis操作

使用示例：

```
from pylhb4redis.myredis import MyRedis

if __name__=="__main__":
    r=MyRedis()
    # 键值对测试
    print("--键值对测试--")
    r.set("Name","Mr.Lee")
    name=r.get("Name")
    print(name)

    # 哈希表
    print("--哈希表测试--")
    hdata={
        "Name":"Mr.Lee",
        "Age":19
    }
    r.hset("Man",hdata)
    name=r.hget("Man","Name")
    age=r.hget("Man","Age")
    print(name,age)

    # 列表处理
    print("--列表处理--")
    names=["小红","小明"]
    r.lpush("Studends",names)
    students=r.lrangle("Studends")
    print(students)

    # 集合处理
    print("--集合处理--")
    names=["李生","孔姐","李生"]
    r.sadd("Peoples",names)
    mans=r.smemebers("Peoples")
    print(mans)

    # 遍历所有键
    print("--遍历所有键--")
    r.fetchAll()

    # 清除所有键
    print("--清除所有键--")
    r.flushall()
```
