This project provides a Python wrapper for the Internet.bs API, allowing easy interaction with various domain management functionalities.
- Account management
- Domain operations
- DNS record management
- URL and Email forwarding
- Host management
To install the package, use pip:
pip install internetbs-api
First, import the necessary classes:
from internetbs import Account, Domain, DNS, Forwarding, HostThen, initialize the API with your credentials:
import os
api_key = os.environ['INTERNETBS_API_KEY']
password = os.environ['INTERNETBS_PASSWORD']
test_mode = False # Set to True for sandbox testing only
account = Account(api_key, password, test_mode=test_mode, timeout=30)
domain = Domain(api_key, password, test_mode)
dns = DNS(api_key, password, test_mode)
forwarding = Forwarding(api_key, password, test_mode)
host = Host(api_key, password, test_mode)result = domain.check_availability('example.com')
print(result)result = dns.add_record('example.com', 'A', '192.168.1.1')
print(result)result = forwarding.add_url_forward('example.com', 'https://destination.com')
print(result)result = host.create_host('ns1.example.com', '192.168.1.1')
print(result)For detailed documentation on all available methods and their parameters, please refer to the inline comments in the source code.
Contributions are welcome! Please feel free to submit a Pull Request.
If specific functions do not work, do not hesitate to open an issue as I have not fully implemented all functions.
- Always load
INTERNETBS_API_KEYandINTERNETBS_PASSWORDfrom environment variables or a secret manager (never commit credentials). - Every client defaults to
timeout=30seconds on outbound HTTP calls; passtimeout=<seconds>to bound latency explicitly. - Never enable
test_mode=Truein production (verify=Falseis restricted to the Internet.bs sandbox).get_last_request_url(reveal=False)masksApiKeyandPasswordby default.
Need custom features, enterprise integration, or priority support? Maintained by Eclipse Technology (contact@eclipse-technology.eu).