Skip to main content

说明

  • 操作dnspod域名(https://www.dnspod.cn)
  • 支持对用户、域名以及记录相关的操作。实现了官方95%以上的功能,覆盖了所有常用功能。

安装

1. 安装requests
pip install requests

2. 安装dns-dnspod
pip install dns-dnspod

3. 使用
import pydnspod

user_id = 'your-user-id'
user_token = 'your-user-token'

创建连接:
dp = pydnspod.connect(user_id, user_token)

获取api版本:
dp.api_version()

操作用户: dp.user.*
dp.user.detail()            # 获取用户的详细信息
dp.user.modify_email()      # 修改用户的邮箱
dp.user.modify_password()   # 修改用户的密码
dp.user.modify_userinfo()   # 修改用户个人信息
dp.user.user_log()          # 获取用户登录日志

操作域名: dp.domain.*
dp.domain.add()             # 添加domain
dp.domain.remove()          # 删除domain
dp.domain.list()            # 列出domain
dp.domain.info()            # domain信息
dp.domain.log()             # domain操作日志
dp.domain.mark()            # domain设置星标
dp.domain.purview()         # 域名权限
dp.domain.remark()          # 域名备注
dp.domain.group_add()       # 添加分组
dp.domain.group_list()      # 列出分组
dp.domain.group_remove()    # 删除分组
dp.domain.group_modify()    # 修改分组
dp.domain.record_line()     # 获取域名支持的线路类型
dp.domain.record_type()     # 获取域名支持的记录类型

操作记录: dp.record.*
pd.record.add()             # 添加record
pd.record.info()            # 查看record信息
pd.record.list()            # 查询符合条件的record
pd.record.remove()          # 删除record
pd.record.remark()          # 给record设置备注
pd.record.modify()          # 修改record
pd.record.modify_status()   # 修改record的状态。启用或禁用
pd.record.record_id()       # 获取符合条件的子域名的record id
pd.record.status()          # 获取启用或禁用的records。

Metadata

Release files for dns-dnspod 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dns-dnspod 1.0.0
File Size Uploaded Provenance Actions
dns-dnspod-1.0.0.tar.gz 5.5 kB Without provenance Details for dns-dnspod-1.0.0.tar.gz

Release files / dns-dnspod-1.0.0.tar.gz

Download URL dns-dnspod-1.0.0.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
042c6953b270516b720636fd147fd2a9f053846a8073428bbe9890d37a04d5a7
BLAKE2b-256 checksum
How to use checksums
b69be79d80c17dbd30abe08ef2d4ddb10339ff62b6ded6ac8d30fd9d31d68cc1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

Security for dns-dnspod 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

1 release file No provenance

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