Arknights-related Toolkit
Project description
明日方舟(Arknights) 相关功能的整合库
现拥有如下功能:
- 抽卡
- 模拟十连
- 随机干员生成
- 公招链接生成
- 干员信息查询
- 猜干员游戏
- 抽卡结果查询
欢迎 PR
安装
pip install arknights-toolkit
pdm add arknights-toolkit
配置
抽卡分析功能依赖于sqlite数据库,请参考网络资源(如菜鸟教程)安装SQLite数据库,无需控制数据库用户、创建数据库表等操作。但若为Windows环境,还需设置环境变量,无需配置数据库环境
使用前需要运行 initialize, 以下载图片资源:
from arknights_toolkit import initialize
initialize(cover=True)
示例
from arknights_toolkit.gacha import ArknightsGacha, GachaUser, simulate_image
from pathlib import Path
import asyncio
async def main():
gacha = ArknightsGacha()
user = GachaUser()
data = gacha.gacha(user, 10)
img = await simulate_image(data[0])
with Path("example_sim.png").open("wb+") as f:
f.write(img)
asyncio.run(main())
抽卡结果:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
arknights-toolkit-0.4.0.tar.gz
(11.8 MB
view hashes)
Built Distribution
Close
Hashes for arknights_toolkit-0.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7315b4a594f11d143142a8a954d39d975c71ced4b8eae2153cf3a8eb23a28d7b |
|
MD5 | 6f560542ead3f4bed620f06a467a10c3 |
|
BLAKE2b-256 | 28c4ada097d8ebef6487d5b7c6f715839176fe73d6e0eea1e7b263f8e71e4e8e |