{"id":28321,"library":"teamhack-dns","title":"teamhack-dns","description":"Hack the Box Team Support Services library for managing DNS records and team infrastructure. Currently at version 0.0.1398 with rapid, frequent releases; no stable release schedule yet.","status":"active","version":"0.0.1398","language":"python","source_language":"en","source_url":"https://github.com/teamhack/teamhack-dns","tags":["dns","hackthebox","team","infrastructure"],"install":[{"cmd":"pip install teamhack-dns","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"HTTP client for API calls","package":"requests","optional":false}],"imports":[{"note":"Underscore required in package name","wrong":"from teamhackdns import TeamHackDNS","symbol":"TeamHackDNS","correct":"from teamhack_dns import TeamHackDNS"},{"note":"","wrong":null,"symbol":"DNSRecord","correct":"from teamhack_dns import DNSRecord"}],"quickstart":{"code":"from teamhack_dns import TeamHackDNS\nimport os\n\nclient = TeamHackDNS(\n    api_key=os.environ.get('TEAMHACK_API_KEY', '')\n)\n\n# List all DNS records\nrecords = client.list_records()\nprint(records)","lang":"python","description":"Initialize the client with your API key and list DNS records."},"warnings":[{"fix":"Use `from teamhack_dns import ...` (underscores).","message":"Package name uses hyphens (teamhack-dns) but the Python import uses underscores (teamhack_dns). A common mistake is to import with hyphens.","severity":"gotcha","affected_versions":"all"},{"fix":"Use `api_key=your_key` instead of `key=your_key`.","message":"The API key parameter name changed from 'key' to 'api_key' in v0.0.1300. Old code passing `key=` will fail with TypeError.","severity":"breaking","affected_versions":">=0.0.1300"},{"fix":"Replace `client.add_record(...)` with `client.create_record(...)`.","message":"The `add_record()` method is deprecated in favor of `create_record()`. It still works but will be removed in a future release.","severity":"deprecated","affected_versions":">=0.0.1350"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Install with `pip install teamhack-dns` and import as `from teamhack_dns import TeamHackDNS`.","cause":"Trying to import with hyphens or without underscore.","error":"ModuleNotFoundError: No module named 'teamhackdns'"},{"fix":"Use `api_key` instead: `TeamHackDNS(api_key='...')`.","cause":"Using the old parameter name `key` for API key.","error":"TypeError: __init__() got an unexpected keyword argument 'key'"},{"fix":"Use `create_record()` instead of `add_record()`.","cause":"Using deprecated method name in newer version.","error":"AttributeError: 'TeamHackDNS' object has no attribute 'add_record'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}