pycdmon
Professional Python client for cdmon Domains & DNS API.
- Full endpoint coverage for core domain + DNS operations
- Sync and async clients
- Typed payload helpers
- Clean error model (
CdmonApiError,CdmonTransportError) - Designed for human and agent workflows
Install
pip install pycdmon
Or from source:
pip install -e .[dev]
Quickstart
from pycdmon import CdmonDomainsClient
with CdmonDomainsClient(api_key="YOUR_API_KEY") as client:
result = client.check("example.com")
print(result["data"]["result"]["available"])
Async usage
import asyncio
from pycdmon import AsyncCdmonDomainsClient
async def main() -> None:
async with AsyncCdmonDomainsClient(api_key="YOUR_API_KEY") as client:
print(await client.check("example.com"))
asyncio.run(main())
CLI (cdmon)
After installation, a cdmon command is available:
export CDMON_API_KEY="your_api_key"
cdmon check example.com
cdmon info example.com
cdmon authcode example.com
cdmon renew example.com --period 1
cdmon transfer example.com 'AUTH-CODE'
cdmon dns-records example.com
cdmon dns-create example.com --host @ --type A --destination 1.2.3.4 --ttl 900
cdmon dns-delete example.com --host @ --type A
cdmon price com create
cdmon periods com renew
cdmon balance
cdmon status check
You can also pass the key inline:
cdmon --api-key "$CDMON_API_KEY" check example.com
Supported operations
- Endpoint status:
status - Domains:
check,info,authcode,list_domains,register,renew,transfer,restore - Domain options:
set_block,set_whois_private,set_dnssec,modify_contact - DNS:
set_nameservers,get_dns_records,create_dns_record,edit_dns_record,delete_dns_record,send_dns_key - Billing/meta:
get_price,get_periods,balance - Auto-renewal:
get_autorenewal,manage_autorenewal
Error handling
from pycdmon import CdmonApiError, CdmonDomainsClient
try:
with CdmonDomainsClient(api_key="...") as client:
client.transfer("example.com", "wrong-authcode")
except CdmonApiError as exc:
print(exc.status_code, exc.message)
print(exc.payload)
Agent-friendly repo workflow
This repository is structured to be easy for coding agents:
src/strict package layouttests/isolated, deterministic HTTP testsexamples/runnable snippetsdocs/implementation and API notes- CI with lint + tests
Suggested autonomous loop for agents:
- Add/update behavior in
src/pycdmon - Add/adjust tests in
tests/ - Run
ruff check . && pytest - Keep commits small and descriptive
Releases
This repository supports automatic releases from main using Python Semantic Release and Conventional Commits.
Why this approach
This is a Python package, so the release automation is now Python-native:
- no
package.json - no Node-based
semantic-release - versioning is configured in
pyproject.toml - the workflow uses
python-semantic-release,build, and optionaltwine
Conventional Commits are still used, but they are only the input convention for deciding the version bump. They do not imply a Node/npm release stack.
How it works
- merge changes into
main - GitHub Actions runs validation (
ruff check .andpytest) python-semantic-releaseinspects commit messages since the last tag- if a release is warranted, it will:
- determine the next version
- update
pyproject.toml - create the release commit and tag
- publish the GitHub Release
- if
PYPI_TOKENis defined in repository secrets, the workflow also publishesdist/*to PyPI viatwine upload - if
PYPI_TOKENis not defined butPYPI_MASTER_TOKENexists, the workflow falls back to that token for PyPI publication
Commit conventions
Use Conventional Commits so release automation can infer version bumps:
fix:-> patch releasefeat:-> minor releasefeat!:or any commit withBREAKING CHANGE:-> major releasedocs:,test:,chore:-> no release by default
Example:
git commit -m "fix: handle TXT DNS records with value field"
Notes
- The release workflow only runs on pushes to
main. - The repository must allow GitHub Actions to push release commits and tags using
GITHUB_TOKEN. - If branch protection is strict, make sure it still permits the release workflow to push the generated release commit.
- If neither
PYPI_TOKENnorPYPI_MASTER_TOKENis present, the workflow still creates the Git tag and GitHub Release and skips the PyPI upload.
API reference source
Based on cdmon official API docs: https://apidedominioscat.docs.apiary.io/#introduction/endpoints-disponibles
License
MIT
Metadata
Release files for pycdmon 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pycdmon-1.0.1.tar.gz | 24.7 kB | Without provenance | Details for pycdmon-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pycdmon-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for pycdmon-1.0.1-py3-none-any.whl |
Total release size: 34.3 kB
Release files / pycdmon-1.0.1.tar.gz
| Download URL | pycdmon-1.0.1.tar.gz |
|---|---|
| Size | 24.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b25dd828ea9a7e88b4ee05ba887e82e2e023fd1a33c5ef016d310ef6738bd083
|
|
BLAKE2b-256 checksum How to use checksums |
fb410407e7cc2b6a26f1d7cbdab234a4a96f7e4f7fc7cb3b9abb0729de6aae02
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.13
|
Release files / pycdmon-1.0.1-py3-none-any.whl
| Download URL | pycdmon-1.0.1-py3-none-any.whl |
|---|---|
| Size | 9.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
28191965d58cd9a6aedc12553538e25ac252fa59c158b0b4ce54876b55194ad0
|
|
BLAKE2b-256 checksum How to use checksums |
a680ad643930df6eb5113c38977fbdb839b3ed11d6787f0be2b92ac765b10d03
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.13
|
Security for pycdmon 1.0.1
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.