Simple GoDaddy domain availability checker
Project description
godaddycheck
Simple Python package and CLI tool for checking domain availability using the GoDaddy API.
Features
- Check domain availability
- Suggest domain names based on keywords
- List available TLDs (top-level domains)
- Built-in retry logic with exponential backoff
- Both library and CLI interface
- Automatic price normalization
Installation
pip install godaddycheck
Or install from source:
git clone https://github.com/yourusername/godaddycheck.git
cd godaddycheck
pip install -e .
Setup
You need GoDaddy API credentials. Get them from GoDaddy Developer Portal.
Set environment variables:
export GODADDY_API_KEY="your_api_key"
export GODADDY_API_SECRET="your_api_secret"
Or create a .env file:
GODADDY_API_KEY=your_api_key
GODADDY_API_SECRET=your_api_secret
Usage
Command Line Interface
Check domain availability
# Quick check
godaddycheck check example.com
# Full check with more details
godaddycheck check example.com --type FULL
# JSON output
godaddycheck check example.com --json
Get domain suggestions
# Get 10 suggestions (default)
godaddycheck suggest tech
# Get 5 suggestions
godaddycheck suggest startup --limit 5
# JSON output
godaddycheck suggest app --json
List available TLDs
# Show first 20 TLDs (default)
godaddycheck tlds
# Show all TLDs
godaddycheck tlds --limit 0
# Show first 50 TLDs
godaddycheck tlds --limit 50
# JSON output
godaddycheck tlds --json
Python Library
Basic usage
import godaddycheck
# Check a domain
result = godaddycheck.check('example.com')
print(f"Available: {result['available']}")
print(f"Price: ${result.get('price', 'N/A')}")
# Get suggestions
suggestions = godaddycheck.suggest('tech', limit=5)
for s in suggestions:
print(f"{s['domain']}: ${s.get('price', 'N/A')}")
# Get TLDs
tlds = godaddycheck.tlds()
print(f"Found {len(tlds)} TLDs")
Using the client class
from godaddycheck import GoDaddyClient
# Initialize client
client = GoDaddyClient()
# Check domain
result = client.check('example.com', check_type='FAST')
print(result)
# Get suggestions
suggestions = client.suggest('startup', limit=10)
print(suggestions)
# Get TLDs
tlds = client.tlds()
print(tlds)
# Clean up
client.close()
Using context manager
from godaddycheck import GoDaddyClient
with GoDaddyClient() as client:
result = client.check('example.com')
print(result)
# Client automatically closed
Custom configuration
from godaddycheck import GoDaddyClient
client = GoDaddyClient(
api_key='your_key',
api_secret='your_secret',
max_retries=5,
timeout=60.0
)
result = client.check('example.com')
API Response Examples
Check domain
{
"domain": "example.com",
"available": false,
"currency": "USD"
}
Suggest domains
[
{
"domain": "techstartup.com",
"available": true,
"price": 12.99,
"currency": "USD"
},
{
"domain": "mytech.io",
"available": true,
"price": 39.99,
"currency": "USD"
}
]
List TLDs
[
{
"name": "com",
"type": "GENERIC"
},
{
"name": "io",
"type": "COUNTRY_CODE"
}
]
Error Handling
The package automatically retries failed requests with exponential backoff for:
- Network errors
- Timeouts
- Rate limiting (429)
- Server errors (5xx)
from godaddycheck import GoDaddyClient
import httpx
try:
client = GoDaddyClient()
result = client.check('example.com')
except ValueError as e:
print(f"Configuration error: {e}")
except httpx.HTTPStatusError as e:
print(f"API error: {e}")
except Exception as e:
print(f"Unexpected error: {e}")
Development
# Clone the repo
git clone https://github.com/yourusername/godaddycheck.git
cd godaddycheck
# Install in development mode
pip install -e .
# Install dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
Requirements
- Python >= 3.7
- httpx >= 0.24.0
License
MIT License - see LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Credits
Inspired by the bella project's GoDaddy service implementation.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file godaddycheck-0.1.0.tar.gz.
File metadata
- Download URL: godaddycheck-0.1.0.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
711726df684611f57644588894c71fe36e47a2d7943b3a4d192f02a02500898f
|
|
| MD5 |
0671aa08a40acbbf32abf6ff272049a4
|
|
| BLAKE2b-256 |
e77eda85ab68d0191115366b9d02afc6413c745cdfe85cb98a969c4aa7868efb
|
File details
Details for the file godaddycheck-0.1.0-py3-none-any.whl.
File metadata
- Download URL: godaddycheck-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3fb05577fd2e07a156c69e4cafb3bbff221a0737e35d5e2777c9f86d3ebc1b39
|
|
| MD5 |
4b39c0d1ffa58349ada6e0fa202f2308
|
|
| BLAKE2b-256 |
bb4111cccac9fe54437adf263bfc575625a9a5059f4a07d468580a2578e097eb
|