Skip to main content

shizukudns

DNSHE 免费域名 API 全栈管理工具(CLI + Web)。命令为 myn,覆盖 DNSHE Free Domain API v2.0 全部 18 个接口。

PyPI Python License: MIT

安装

shizukudns 是一个 CLI 应用程序,推荐用以下任一方式安装。

方式一:pipx(推荐,自动隔离环境)

pipx 会为每个 CLI 工具创建独立虚拟环境,命令全局可用,不会污染系统 Python。

# 安装 pipx(Debian/Ubuntu/macOS 均可)
sudo apt install pipx          # Debian/Ubuntu
# brew install pipx            # macOS
# pip install --user pipx      # 其他系统

pipx ensurepath               # 把 ~/.local/bin 加入 PATH(仅首次)
pipx install shizukudns

安装后 myn 命令全局可用。升级用 pipx upgrade shizukudns

方式二:venv + pip

python3 -m venv ~/.venvs/shizukudns
source ~/.venvs/shizukudns/bin/activate
pip install shizukudns
myn -v
# 之后每次使用前先 activate,或直接用 ~/.venvs/shizukudns/bin/myn

方式三:pip --break-system-packages(不推荐,仅应急)

pip install --break-system-packages shizukudns

⚠️ 仅当上述方式不可用时使用,可能影响系统 Python。

方式四:直接下载运行(无需安装)

# 下载 wheel 后用 python 直接运行,无需安装
pip download shizukudns --no-deps -d ./sd
pip install --target ./sd -r <(pip show shizukudns 2>/dev/null || echo "requests Flask")
python -c "import sys; sys.path.insert(0,'./sd'); from shizukudns.cli import main; main()" -v

安装后即可使用 myn 命令。

快速开始

# 添加一个 DNSHE 账号(API Key + Secret)
myn account add 我的账号 cfsd_xxxxxxxxxx yyyyyyyyyyyy

# 查看配额
myn quota

# 列出子域名
myn sub list

# 启动 Web 管理界面
myn web
# 指定端口(--host 用于定义端口)
myn web --host 8080

命令总览

全局

命令 说明
myn -v, myn --version 查看版本
myn -h, myn --help 查看帮助
myn web 启动 Web 管理界面(默认 http://127.0.0.1:7777
myn web --host 8080 指定端口(--host 用于定义端口)
myn web --bind 0.0.0.0 指定绑定地址
myn stats 查看本地统计

账号管理 (account)

myn account list                                   # 列出账号
myn account add <name> <api_key> <api_secret>       # 添加账号
myn account use <id>                                # 设为默认
myn account remove <id>                             # 删除账号
myn account show [id]                               # 查看详情

子域名 (sub)

myn sub list [page=1] [per_page=20] [search=xxx] [status=active]
myn sub get <subdomain_id>
myn sub register <subdomain> <rootdomain>
myn sub renew <subdomain_id>
myn sub delete <subdomain_id>

DNS 记录 (dns)

myn dns list <subdomain_id>
myn dns create <subdomain_id> <type> <content> [name=@] [ttl=600] [priority=10]
myn dns update <id> [type=A] [content=...] [ttl=600]
myn dns delete <id|record_id>

API 密钥 (keys)

myn keys list
myn keys create <key_name> [ip_whitelist=...]
myn keys regenerate <key_id>
myn keys delete <key_id>

配额 / WHOIS / 永久升级

myn quota
myn whois <domain>
myn upgrade list
myn upgrade create <subdomain_id>
myn upgrade assist <assist_code>
myn upgrade cancel <request_id>

操作日志

myn logs [page=1] [per_page=20] [endpoint=...] [success=true]
myn logs clear

Web 界面

myn web 启动一个本地 Flask 服务,提供与 CLI 等价的全功能图形界面:

  • 仪表盘:配额概览 + 调用统计 + 端点分布 + 最近动态
  • 子域名:筛选 / 排序 / 分页 / 注册 / 续期 / 删除 / 导出 CSV
  • DNS 记录:8 种记录类型(A/AAAA/CNAME/MX/TXT/NS/SRV/CAA)
  • API 密钥:创建 / 列表 / 重置 Secret / 删除
  • 配额 / WHOIS / 永久升级
  • 账号切换:侧边栏一键切换
  • 内置终端:Web 版命令行
  • 操作日志:6 维筛选 + 详情 + 导出 CSV
  • 深色模式:跟随系统或手动切换

数据存储

配置与日志存储在 ~/.shizukudns/

  • config.json — 账号列表(API Key + Secret)
  • logs.db — SQLite 操作日志

可通过环境变量 SHIZUKUDNS_HOME 自定义数据目录。

覆盖的 API

覆盖 DNSHE Free Domain API v2.0 全部 18 个接口:

模块 接口
子域名 (5) list / get / register / delete / renew
DNS 记录 (4) list / create / update / delete
API 密钥 (4) list / create / regenerate / delete
配额 (1) quota
WHOIS (1) whois
永久升级 (4) list / create / assist / cancel

技术栈

  • Python ≥ 3.9
  • requests — HTTP 客户端
  • Flask — Web 界面
  • SQLite — 操作日志存储(Python 内置)

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shizukudns-2.1.0.tar.gz (47.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shizukudns-2.1.0-py3-none-any.whl (58.4 kB view details)

Uploaded Python 3

File details

Details for the file shizukudns-2.1.0.tar.gz.

File metadata

  • Download URL: shizukudns-2.1.0.tar.gz
  • Upload date:
  • Size: 47.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for shizukudns-2.1.0.tar.gz
Algorithm Hash digest
SHA256 3745d4230b1013c19d6f91807158820a4a9ef7f5a41a833cad016e1096379016
MD5 bfd27467866ba660374164aa1c89f1e2
BLAKE2b-256 32f71fff88fb143708234749cebefa3d6515f5d3ec07bc5a2d6a6b540ed53e87

See more details on using hashes here.

File details

Details for the file shizukudns-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: shizukudns-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 58.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for shizukudns-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ff63f8c55604e432982995de46cd05fbad247edff6592adf8bac92a1651f2448
MD5 1cbaf6ae717a4ff1755511b62405d894
BLAKE2b-256 a011dfdbbc6a293b083feadff48ddc44e1b50b6d23ce7813be89836a71d0f11f

See more details on using hashes here.

Release history Release notifications | RSS feed

2.3.0

2 files

2.2.1

2 files

2.2.0

2 files

2.1.1

2 files

This release

2.1.0 This release

2 files

2.0.4

2 files

2.0.3

2 files

2.0.2

2 files

2.0.1

2 files

2.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page