Metadata-Version: 2.5
Name: funchallenge
Version: 0.0.3
Summary: dark_challenge_2048 数据库查询封装：基于 SQLAlchemy 的 2048 主题挑战数据读取工具
Project-URL: Organization, https://github.com/farfarfun
Project-URL: Repository, https://github.com/farfarfun/funchallenge
Project-URL: Releases, https://github.com/farfarfun/funchallenge/releases
Author-email: 牛哥 <niuliangtao@qq.com>, farfarfun <farfarfun@qq.com>
Maintainer-email: 牛哥 <niuliangtao@qq.com>, farfarfun <farfarfun@qq.com>
License-Expression: MIT
License-File: LICENSE
Requires-Python: >=3.10
Requires-Dist: farlog>=1.1.7
Requires-Dist: funsecret>=1.4.84
Requires-Dist: pymysql>=1.1
Requires-Dist: sqlalchemy>=2.0
Description-Content-Type: text/markdown

# funchallenge

`funchallenge` 是一个针对 `dark_challenge_2048` 数据表的轻量数据库查询封装：
基于 SQLAlchemy 创建数据库连接（连接串通过 `funsecret` 读取），并提供
`execute_sql` 方法执行任意 SQL 查询。

## 安装

```bash
pip install funchallenge
```

## 最小示例

```python
from funchallenge.db.base import DatabaseError, DbBase

db = DbBase()
try:
    rows = db.execute_sql("select * from dark_challenge_2048")
except DatabaseError as e:
    print(f"查询失败: {e}")
else:
    print(f"共 {len(rows)} 条数据")
```

也可以直接调用封装好的查询入口：

```python
from funchallenge.server.core import fetch_dark_challenge_2048

rows = fetch_dark_challenge_2048()
```

> 使用前需通过 `funsecret` 配置数据库连接串
> （`farfarfun` / `darkchallenge` / `db` / `uri`）。

---

## 关于 farfarfun

[farfarfun](https://github.com/farfarfun) 是一个专注于实用工具库的开源组织，
涵盖云存储、数据处理、AI、多媒体与开发工具链等方向。

- 🏠 组织主页：<https://github.com/farfarfun>
- 📦 PyPI：<https://pypi.org/user/niuliangtao/>
- 📧 联系：farfarfun@qq.com

本项目基于 [MIT](LICENSE) 协议开源。
