Skip to content
theqiyas.cc
Problem Solver
cc · project · Open source started 2026-10-14

Namecheap Python SDK

A small, typed Python client for the Namecheap Domains and DNS API, sync and async, that turns Namecheap's XML into plain dataclasses and makes the replace-everything DNS API safe to use one record at a time.

$ pip install namecheap-python-sdk
Pydantic Python httpx

The Namecheap member of the DNS SDK family, with the same point call as the GoDaddy, DigitalOcean and Hostinger clients.

from namecheap_sdk import Namecheap

with Namecheap("api_user", "API_KEY", client_ip="203.0.113.5") as nc:
    nc.dns.point("example.com", "shop", "203.0.113.10")

Namecheap’s DNS API can only replace every record of a domain at once. The client reads the current set, changes the one record and writes the whole set back, so shop.example.com now resolves to 203.0.113.10 and every other record stays as it was. It works in sync and async code, parses the XML with the standard library, and loads settings from code, environment variables or a config file through goodconf. Sandbox accounts work by passing environment="sandbox".

Install with pip install namecheap-python-sdk.