This repository has been archived on 2026-08-27. You can view files and clone it. You cannot open issues or pull requests or push a commit.
T
2022-10-02 17:31:05 +08:00
2022-09-02 20:56:36 +08:00
2022-09-02 20:56:16 +08:00
2022-09-02 20:56:16 +08:00
2022-10-02 17:28:29 +08:00

py 版访问次数计数器

翻自 journey-ad 的计数器

新特性

  • 使用了异步Web框架FastAPI来提高效率 注:数据库部分使用了同步
  • 可以自定义显示图片的数量(长度)
  • 支持API接口以便自行开发
  • 支持Redis数据库链接

数据迁移脚本 sql2Redis.py 需要自行手动修改

失去的特性

  • 暂未支持MongoDB

安装&运行

$ pip3 install -r requirements.txt
$ uvicorn src:create_app --factory  or 
$ sh run.sh  or
$ python3 main.py  # 两条命令等价

使用

  • 访问http://127.0.0.1:8000/<any name you want>

示例: http://127.0.0.1:8000/_redirect?length=10&theme=moebooru

参数

  • length

length: 1 ≤ x ≤ 10

  • theme

theme: blacked lewd lisu moebooru asoul

单元测试

  • 没有单元测试(没写)

开源

  • 本项目以Apache-2.0许可开源, 即:
    • 你可以直接使用该项目提供的功能, 无需任何授权
    • 你可以在注明来源版权信息的情况下对源代码进行任意分发和修改以及衍生
S
Description
No description provided
Readme Apache-2.0
131 KiB
1 Watchers 0 Forks
Languages
Python 94%
HTML 4.1%
Dockerfile 1.9%